diff --git a/product/ERP5/tests/testERP5Base.py b/product/ERP5/tests/testERP5Base.py index 720625b05324c43f9e4f8981ca9e1e953e974b4f..067034dd16565c0331c6251b5444f811b76504d6 100644 --- a/product/ERP5/tests/testERP5Base.py +++ b/product/ERP5/tests/testERP5Base.py @@ -737,6 +737,25 @@ class TestERP5Base(ERP5TypeTestCase): self.assertEquals(organisation.getDefaultAddressCity(),'Lille') self.assertEquals(organisation.getDefaultAddressZipCode(), '59000') + # retry last action, inverting the modified property + # XXX Whether this test is usefull or not completely depends on Python + # implementation. Python currently does not guarantee the order of a dict, + # so it might very well be that at some point, a change in the + # implementation makes the test always succeed, where it would fail with + # the curent implementation. + person.manage_delObjects(['default_address']) + + person.edit( + default_address_city='Lille', + default_address_zip_code='69000') + + self.assertNotEquals(person.getDefaultAddress(), + organisation.getDefaultAddress()) + self.assertEquals(person.getDefaultAddressCity(),'Lille') + self.assertEquals(person.getDefaultAddressZipCode(), '69000') + self.assertEquals(organisation.getDefaultAddressCity(),'Lille') + self.assertEquals(organisation.getDefaultAddressZipCode(), '59000') + ################################## ## Tests ##################################