Commit 24b36f8a authored by Julien Muchembled's avatar Julien Muchembled

tests: remove a few self.commit()

parent 6eeaf981
......@@ -292,7 +292,7 @@ class TestInventory(InventoryAPITestCase):
sim_mvt.setDeliveryValue(mvt)
self.failIf(sim_mvt.isAccountable())
# not accountable movement are not counted by getInventory
self.commit(); self.tic() # (after reindexing of course)
self.tic() # (after reindexing of course)
self.assertInventoryEquals(100, section_uid=self.section.getUid())
def test_OmitSimulation(self):
......
......@@ -298,7 +298,7 @@ class TestPreferences(PropertySheetTestCase):
id='user_a_1', portal_type='Preference')
user_a_2 = portal_preferences.newContent(
id='user_a_2', portal_type='Preference')
self.commit(); self.tic()
self.tic()
# enable a pref
portal_workflow.doActionFor(
......@@ -312,7 +312,7 @@ class TestPreferences(PropertySheetTestCase):
user_b_1 = portal_preferences.newContent(
id='user_b_1', portal_type='Preference')
user_b_1.setPreferredAccountingTransactionAtDate(DateTime(2002, 02, 02))
self.commit(); self.tic()
self.tic()
# enable this preference
portal_workflow.doActionFor(
......@@ -335,12 +335,12 @@ class TestPreferences(PropertySheetTestCase):
id='manager_pref', portal_type='Preference')
manager_pref.setPreferredAccountingTransactionAtDate(
DateTime(2012, 12, 12))
self.commit(); self.tic()
self.tic()
# enable this preference
portal_workflow.doActionFor(
manager_pref, 'enable_action', wf_id='preference_workflow')
self.assertEquals(manager_pref.getPreferenceState(), 'enabled')
self.commit(); self.tic()
self.tic()
# check users preferences are still enabled
self.assertEquals(user_a_1.getPreferenceState(), 'enabled')
......@@ -374,7 +374,7 @@ class TestPreferences(PropertySheetTestCase):
# picked first
priority=Priority.GROUP,
preferred_accounting_transaction_simulation_state_list=['user_a'])
self.commit(); self.tic()
self.tic()
# enable a pref
portal_workflow.doActionFor(
......@@ -385,7 +385,7 @@ class TestPreferences(PropertySheetTestCase):
user_b = portal_preferences.newContent(
id='user_b', portal_type='Preference',
preferred_accounting_transaction_simulation_state_list=['user_b'])
self.commit(); self.tic()
self.tic()
# enable this preference
portal_workflow.doActionFor(
......
......@@ -1680,7 +1680,7 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
person.manage_permission('View', roles=['Auditor'], acquire=0)
# The user may not view the person object.
self.commit(); self.tic()
self.tic()
self.assertTrue('Auditor' not in user.getRolesInContext(person))
self.logout()
newSecurityManager(None, user)
......@@ -1695,7 +1695,7 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
# reflect the security change, until the affected objects are
# reindexed, and Jean-Paul believes that this should not be
# automatic.
self.commit(); self.tic()
self.tic()
self.assertTrue('Auditor' in user.getRolesInContext(person))
self.logout()
newSecurityManager(None, user)
......@@ -1706,7 +1706,7 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
# Now invoke the reindexing explicitly, so the catalog should be
# synchronized.
person_module.recursiveReindexObject()
self.commit(); self.tic()
self.tic()
self.assertTrue('Auditor' in user.getRolesInContext(person))
self.logout()
newSecurityManager(None, user)
......
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