Commit a1ef81f8 authored by Aurel's avatar Aurel

transaction is not a callable

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44604 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 09c19f65
......@@ -154,7 +154,7 @@ class TestERP5BankingMixin(ERP5TypeTestCase):
if self.PAS_installed:
# reindexing is required for the security to work
transaction().commit()
transaction.commit()
self.tic()
......
......@@ -293,7 +293,7 @@ class TestERP5BankingCheckPaymentMixin(TestERP5BankingMixin):
self.workflow_tool.doActionFor(new_payment, 'plan_action',
wf_id='check_payment_workflow')
self.assertEqual(new_payment.getSimulationState(), 'planned')
transaction().commit()
transaction.commit()
if will_fail:
message = self.assertWorkflowTransitionFails(new_payment,
'check_payment_workflow', 'confirm_action')
......@@ -303,7 +303,7 @@ class TestERP5BankingCheckPaymentMixin(TestERP5BankingMixin):
if insuffisient_balance:
self.assertTrue(message.find('Bank account is not sufficient')>=0)
self.assertEqual(new_payment.getSimulationState(), 'planned')
transaction().commit()
transaction.commit()
self.workflow_tool.doActionFor(new_payment, 'reject_action',
wf_id='check_payment_workflow')
self.workflow_tool.doActionFor(new_payment, 'cancel_action',
......@@ -314,7 +314,7 @@ class TestERP5BankingCheckPaymentMixin(TestERP5BankingMixin):
new_payment, 'confirm_action',
wf_id='check_payment_workflow')
self.assertEqual(new_payment.getSimulationState(), 'confirmed')
transaction().commit()
transaction.commit()
if check_pay_will_fail:
self.stepInputCashDetails(check_payment=new_payment)
message = self.assertWorkflowTransitionFails(new_payment,
......
......@@ -119,7 +119,7 @@ class TestERP5BankingCheckbookDeliveryMixin(TestERP5BankingMixin):
# in the source
self.createCheckbookReception()
self.checkItemsCreated()
transaction().commit()
transaction.commit()
self.tic()
self.createCheckbookVaultTransfer()
......
......@@ -177,7 +177,7 @@ class TestERP5BankingCheckbookUsualCashTransfer(TestERP5BankingCheckbookUsualCas
# in the source
self.createCheckbookReception()
self.checkItemsCreated()
transaction().commit()
transaction.commit()
self.tic()
self.createCheckbookVaultTransfer()
......
......@@ -71,7 +71,7 @@ class TestERP5BankingCheckbookVaultTransferMixin(TestERP5BankingMixin):
wf_id='checkbook_reception_workflow')
self.workflow_tool.doActionFor(self.checkbook_reception, 'deliver_action',
wf_id='checkbook_reception_workflow')
transaction().commit()
transaction.commit()
self.tic()
def createCheckbookReceptionWithTravelerCheck(self, sequence=None,
......
......@@ -77,7 +77,7 @@ class TestERP5BankingCounterDate(TestERP5BankingMixin):
self.login('super_user')
counter_date_module = self.getPortal().counter_date_module
counter_date_module.manage_delObjects(ids=[x for x in counter_date_module.objectIds()])
transaction().commit()
transaction.commit()
self.tic()
def openCounterDate(self, date=None, site=None, id='counter_date_1', open=True, force_check=0):
......@@ -113,7 +113,7 @@ class TestERP5BankingCounterDate(TestERP5BankingMixin):
ZopeTestCase._print('\n%s ' % message)
LOG('Testing... ', 0, message)
self.openCounterDate(site=self.paris, id='counter_date_1')
transaction().commit()
transaction.commit()
self.tic()
self.openCounterDate(site=self.paris, id='counter_date_2', open=0)
# open counter date and counter
......@@ -181,7 +181,7 @@ class TestERP5BankingCounterDate(TestERP5BankingMixin):
counter_date = getattr(self, id)
self.assertEquals(counter_date.getReference(), reference)
counter_date.close()
transaction().commit()
transaction.commit()
self.tic()
# Starts at one
......@@ -190,12 +190,12 @@ class TestERP5BankingCounterDate(TestERP5BankingMixin):
openAndTest(self.paris, DateTime('2008/01/02'), '2')
# Monotonous: create one but leave it in draft, check same day
self.openCounterDate(site=self.paris, id='counter_date_2008_01_03_paris_draft', date=DateTime('2008/01/03'), open=0)
transaction().commit()
transaction.commit()
self.tic()
openAndTest(self.paris, DateTime('2008/01/03'), '3')
# Monotonous: create one but leave it in draft, check next day
self.openCounterDate(site=self.paris, id='counter_date_2008_01_04_paris_draft', date=DateTime('2008/01/04'), open=0)
transaction().commit()
transaction.commit()
self.tic()
openAndTest(self.paris, DateTime('2008/01/05'), '4')
# Site-scoped
......@@ -217,7 +217,7 @@ class TestERP5BankingCounterDate(TestERP5BankingMixin):
ZopeTestCase._print('\n%s ' % message)
LOG('Testing... ', 0, message)
self.openCounterDate(site=self.paris, id='counter_date_1')
transaction().commit()
transaction.commit()
self.openCounterDate(site=self.paris, id='counter_date_2', open=0)
# open counter date and counter
self.assertRaises(ValidationFailed,
......
......@@ -144,19 +144,19 @@ class TestERP5BankingTravelerCheckSaleMixin(TestERP5BankingMixin):
# in the source
self.traveler_check_model = self.createTravelerCheckModel('traveler_check_model')
self.createCheckbookReceptionWithTravelerCheck()
transaction().commit()
transaction.commit()
self.tic()
self.checkItemsCreatedWithTravelerCheck()
transaction().commit()
transaction.commit()
self.tic()
self.createCheckbookVaultTransferWithTravelerCheck()
transaction().commit()
transaction.commit()
self.tic()
# open counter date and counter
self.openCounterDate(site=self.paris)
self.openCounter(site=self.destination_site)
self.createCheckbookUsualCashTransferWithTravelerCheck()
transaction().commit()
transaction.commit()
self.tic()
def stepCreateTravelerCheckLineList(self, sequence=None, sequence_list=None, **kwd):
......
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