Commit 5ef71b8b authored by Jérome Perrin's avatar Jérome Perrin

use self.assertRaises


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9012 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5d636802
...@@ -145,12 +145,8 @@ class TestAmount(ERP5TypeTestCase): ...@@ -145,12 +145,8 @@ class TestAmount(ERP5TypeTestCase):
Test the method GetVariationPropertyDict. Test the method GetVariationPropertyDict.
""" """
amount = sequence.get('amount') amount = sequence.get('amount')
try: self.assertRaises(KeyError, amount.setVariationPropertyDict,
amount.setVariationPropertyDict(self.variation_property_dict) self.variation_property_dict)
except KeyError:
return
else:
raise KeyError
def stepSetVariationPropertyDict(self, sequence=None, def stepSetVariationPropertyDict(self, sequence=None,
sequence_list=None, **kw): sequence_list=None, **kw):
...@@ -181,12 +177,8 @@ class TestAmount(ERP5TypeTestCase): ...@@ -181,12 +177,8 @@ class TestAmount(ERP5TypeTestCase):
Test the method GetVariationPropertyDict. Test the method GetVariationPropertyDict.
""" """
amount = sequence.get('amount') amount = sequence.get('amount')
try: self.assertRaises(KeyError, amount.setVariationPropertyDict,
amount.setVariationPropertyDict(self.failed_variation_property_dict) self.failed_variation_property_dict)
except KeyError:
return
else:
raise KeyError
def stepCheckEdit(self, sequence=None, sequence_list=None, **kw): def stepCheckEdit(self, sequence=None, sequence_list=None, **kw):
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment