Commit 092895d9 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Replace failUnless() calls by assertTrue().

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31797 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f220b9e9
...@@ -622,7 +622,7 @@ class TestERP5BankingCashBalanceRegulation(TestERP5BankingMixin): ...@@ -622,7 +622,7 @@ class TestERP5BankingCashBalanceRegulation(TestERP5BankingMixin):
# do the workflow transition "deliver_action" # do the workflow transition "deliver_action"
message = self.assertWorkflowTransitionFails(self.cash_balance_regulation, message = self.assertWorkflowTransitionFails(self.cash_balance_regulation,
'cash_balance_regulation_workflow','deliver_action') 'cash_balance_regulation_workflow','deliver_action')
self.failUnless(message.find('local emission letter')>=0) self.assertTrue(message.find('local emission letter')>=0)
def stepCheckFinalInventory(self, sequence=None, sequence_list=None, check_source=1,**kwd): def stepCheckFinalInventory(self, sequence=None, sequence_list=None, check_source=1,**kwd):
""" """
......
...@@ -487,7 +487,7 @@ class TestERP5BankingCashExchange(TestERP5BankingMixin): ...@@ -487,7 +487,7 @@ class TestERP5BankingCashExchange(TestERP5BankingMixin):
def stepDeliverFails(self, sequence=None, sequence_list=None, **kwd): def stepDeliverFails(self, sequence=None, sequence_list=None, **kwd):
message = self.assertWorkflowTransitionFails(self.cash_exchange, message = self.assertWorkflowTransitionFails(self.cash_exchange,
'cash_exchange_workflow','deliver_action') 'cash_exchange_workflow','deliver_action')
self.failUnless(message.find('Insufficient balance')>=0) self.assertTrue(message.find('Insufficient balance')>=0)
################################## ##################################
......
...@@ -621,7 +621,7 @@ class TestERP5BankingCashMovement(TestERP5BankingMixin): ...@@ -621,7 +621,7 @@ class TestERP5BankingCashMovement(TestERP5BankingMixin):
""" """
message = self.assertWorkflowTransitionFails(self.cash_movement, message = self.assertWorkflowTransitionFails(self.cash_movement,
'cash_movement_workflow','start_action') 'cash_movement_workflow','start_action')
self.failUnless(message.find('Insufficient balance')>=0) self.assertTrue(message.find('Insufficient balance')>=0)
def test_01_ERP5BankingCashMovement(self, quiet=QUIET, run=RUN_ALL_TEST): def test_01_ERP5BankingCashMovement(self, quiet=QUIET, run=RUN_ALL_TEST):
......
...@@ -244,7 +244,7 @@ class TestERP5BankingCashMovementNewNotEmitted(TestERP5BankingMonetaryReceptionM ...@@ -244,7 +244,7 @@ class TestERP5BankingCashMovementNewNotEmitted(TestERP5BankingMonetaryReceptionM
self.assertEqual(self.container_1.getCashNumberRangeStop(), '100') self.assertEqual(self.container_1.getCashNumberRangeStop(), '100')
self.assertEqual(len(self.container_1.getAggregateValueList()), 1) self.assertEqual(len(self.container_1.getAggregateValueList()), 1)
self.assertEqual(self.container_1.getAggregateValueList()[0], self.cash_container_item_1) self.assertEqual(self.container_1.getAggregateValueList()[0], self.cash_container_item_1)
# self.failUnless(self.container_1.getAggregateValueList()[0] == self.cash_container_item_1 or self.container_1.getAggregateValueList()[0] == self.cash_container_item_2) # self.assertTrue(self.container_1.getAggregateValueList()[0] == self.cash_container_item_1 or self.container_1.getAggregateValueList()[0] == self.cash_container_item_2)
self.assertEqual(len(self.container_1.objectIds()), 1) self.assertEqual(len(self.container_1.objectIds()), 1)
# now get the line and check it # now get the line and check it
self.container_line_1 = self.container_1.objectValues()[0] self.container_line_1 = self.container_1.objectValues()[0]
...@@ -281,7 +281,7 @@ class TestERP5BankingCashMovementNewNotEmitted(TestERP5BankingMonetaryReceptionM ...@@ -281,7 +281,7 @@ class TestERP5BankingCashMovementNewNotEmitted(TestERP5BankingMonetaryReceptionM
self.assertEqual(self.container_2.getCashNumberRangeStop(), '200') self.assertEqual(self.container_2.getCashNumberRangeStop(), '200')
self.assertEqual(len(self.container_2.getAggregateValueList()), 1) self.assertEqual(len(self.container_2.getAggregateValueList()), 1)
self.assertEqual(self.container_2.getAggregateValueList()[0], self.cash_container_item_2) self.assertEqual(self.container_2.getAggregateValueList()[0], self.cash_container_item_2)
# self.failUnless(self.container_2.getAggregateValueList()[0] == self.cash_container_item_2 or self.container_2.getAggregateValueList()[0] == self.cash_container_item_1) # self.assertTrue(self.container_2.getAggregateValueList()[0] == self.cash_container_item_2 or self.container_2.getAggregateValueList()[0] == self.cash_container_item_1)
self.assertEqual(len(self.container_2.objectIds()), 1) self.assertEqual(len(self.container_2.objectIds()), 1)
# now get the line and check it # now get the line and check it
self.container_line_2 = self.container_2.objectValues()[0] self.container_line_2 = self.container_2.objectValues()[0]
......
...@@ -530,7 +530,7 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin): ...@@ -530,7 +530,7 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin):
""" """
message = self.assertWorkflowTransitionFails(self.cash_sorting, message = self.assertWorkflowTransitionFails(self.cash_sorting,
'cash_sorting_workflow','deliver_action') 'cash_sorting_workflow','deliver_action')
self.failUnless(message.find('Insufficient balance')>=0) self.assertTrue(message.find('Insufficient balance')>=0)
################################## ##################################
## Tests ## Tests
......
...@@ -400,7 +400,7 @@ class TestERP5BankingCashToCurrencySale(TestERP5BankingMixin): ...@@ -400,7 +400,7 @@ class TestERP5BankingCashToCurrencySale(TestERP5BankingMixin):
""" """
message = self.assertWorkflowTransitionFails(self.cash_to_currency_sale, message = self.assertWorkflowTransitionFails(self.cash_to_currency_sale,
'cash_to_currency_sale_workflow','deliver_action') 'cash_to_currency_sale_workflow','deliver_action')
self.failUnless(message.find('Insufficient balance')>=0) self.assertTrue(message.find('Insufficient balance')>=0)
################################## ##################################
## Tests ## Tests
......
...@@ -285,7 +285,7 @@ class TestERP5BankingCheckPaymentMixin(TestERP5BankingMixin): ...@@ -285,7 +285,7 @@ class TestERP5BankingCheckPaymentMixin(TestERP5BankingMixin):
'check_payment_workflow','plan_action') 'check_payment_workflow','plan_action')
LOG('self.assertWorkflowTransitionFails message',0,message) LOG('self.assertWorkflowTransitionFails message',0,message)
if insuffisient_balance: if insuffisient_balance:
self.failUnless(message.find('Bank account is not sufficient')>=0) self.assertTrue(message.find('Bank account is not sufficient')>=0)
# We will force it in order to test the next step # We will force it in order to test the next step
new_payment.plan() new_payment.plan()
else: else:
...@@ -298,9 +298,9 @@ class TestERP5BankingCheckPaymentMixin(TestERP5BankingMixin): ...@@ -298,9 +298,9 @@ class TestERP5BankingCheckPaymentMixin(TestERP5BankingMixin):
'check_payment_workflow','confirm_action') 'check_payment_workflow','confirm_action')
LOG('self.assertWorkflowTransitionFails message',0,message) LOG('self.assertWorkflowTransitionFails message',0,message)
if pending_account: if pending_account:
self.failUnless(message.find('There are operations pending for this account')>=0) self.assertTrue(message.find('There are operations pending for this account')>=0)
if insuffisient_balance: if insuffisient_balance:
self.failUnless(message.find('Bank account is not sufficient')>=0) self.assertTrue(message.find('Bank account is not sufficient')>=0)
self.assertEqual(new_payment.getSimulationState(), 'planned') self.assertEqual(new_payment.getSimulationState(), 'planned')
get_transaction().commit() get_transaction().commit()
self.workflow_tool.doActionFor(new_payment, 'reject_action', self.workflow_tool.doActionFor(new_payment, 'reject_action',
...@@ -319,7 +319,7 @@ class TestERP5BankingCheckPaymentMixin(TestERP5BankingMixin): ...@@ -319,7 +319,7 @@ class TestERP5BankingCheckPaymentMixin(TestERP5BankingMixin):
message = self.assertWorkflowTransitionFails(new_payment, message = self.assertWorkflowTransitionFails(new_payment,
'check_payment_workflow','deliver_action') 'check_payment_workflow','deliver_action')
LOG('self.assertWorkflowTransitionFails message',0,message) LOG('self.assertWorkflowTransitionFails message',0,message)
self.failUnless(message.find('There are operations pending for this vault')>=0) self.assertTrue(message.find('There are operations pending for this vault')>=0)
self.workflow_tool.doActionFor(new_payment, 'reject_action', self.workflow_tool.doActionFor(new_payment, 'reject_action',
wf_id='check_payment_workflow') wf_id='check_payment_workflow')
self.workflow_tool.doActionFor(new_payment, 'cancel_action', self.workflow_tool.doActionFor(new_payment, 'cancel_action',
...@@ -490,7 +490,7 @@ class TestERP5BankingCheckPaymentMixin(TestERP5BankingMixin): ...@@ -490,7 +490,7 @@ class TestERP5BankingCheckPaymentMixin(TestERP5BankingMixin):
""" """
message = self.assertWorkflowTransitionFails(self.check_payment, message = self.assertWorkflowTransitionFails(self.check_payment,
'check_payment_workflow','deliver_action') 'check_payment_workflow','deliver_action')
self.failUnless(message.find('Insufficient balance')>=0) self.assertTrue(message.find('Insufficient balance')>=0)
def stepCheckCheckIsDelivered(self, sequence=None, sequence_list=None, **kwd): def stepCheckCheckIsDelivered(self, sequence=None, sequence_list=None, **kwd):
""" """
......
...@@ -270,8 +270,8 @@ class TestERP5BankingCheckbookDelivery(TestERP5BankingCheckbookDeliveryMixin, ...@@ -270,8 +270,8 @@ class TestERP5BankingCheckbookDelivery(TestERP5BankingCheckbookDeliveryMixin,
""" """
message = self.assertWorkflowTransitionFails(self.checkbook_delivery, message = self.assertWorkflowTransitionFails(self.checkbook_delivery,
'checkbook_delivery_workflow','deliver_action') 'checkbook_delivery_workflow','deliver_action')
self.failUnless(message.find('Sorry, the item with reference')>=0) self.assertTrue(message.find('Sorry, the item with reference')>=0)
self.failUnless(message.find('is not available any more')>=0) self.assertTrue(message.find('is not available any more')>=0)
################################## ##################################
## Tests ## Tests
......
...@@ -300,8 +300,8 @@ class TestERP5BankingCheckbookMovement(TestERP5BankingCheckbookVaultTransferMixi ...@@ -300,8 +300,8 @@ class TestERP5BankingCheckbookMovement(TestERP5BankingCheckbookVaultTransferMixi
""" """
message = self.assertWorkflowTransitionFails(self.checkbook_movement, message = self.assertWorkflowTransitionFails(self.checkbook_movement,
'checkbook_movement_workflow','confirm_to_deliver_action') 'checkbook_movement_workflow','confirm_to_deliver_action')
self.failUnless(message.find('Sorry, the item with reference')>=0) self.assertTrue(message.find('Sorry, the item with reference')>=0)
self.failUnless(message.find('is not available any more')>=0) self.assertTrue(message.find('is not available any more')>=0)
################################## ##################################
## Tests ## Tests
......
...@@ -356,9 +356,9 @@ class TestERP5BankingCheckbookReception(TestERP5BankingMixin): ...@@ -356,9 +356,9 @@ class TestERP5BankingCheckbookReception(TestERP5BankingMixin):
""" """
msg = self.assertWorkflowTransitionFails(self.checkbook_reception2, msg = self.assertWorkflowTransitionFails(self.checkbook_reception2,
'checkbook_reception_workflow', 'deliver_action') 'checkbook_reception_workflow', 'deliver_action')
self.failUnless(msg.find('The following references are already allocated') self.assertTrue(msg.find('The following references are already allocated')
>=0) >=0)
self.failUnless(msg.find('50')>=0) self.assertTrue(msg.find('50')>=0)
def stepDeliverCheckbookReception3(self, sequence=None, sequence_list=None, **kwd): def stepDeliverCheckbookReception3(self, sequence=None, sequence_list=None, **kwd):
""" """
...@@ -374,9 +374,9 @@ class TestERP5BankingCheckbookReception(TestERP5BankingMixin): ...@@ -374,9 +374,9 @@ class TestERP5BankingCheckbookReception(TestERP5BankingMixin):
""" """
msg = self.assertWorkflowTransitionFails(self.checkbook_reception4, msg = self.assertWorkflowTransitionFails(self.checkbook_reception4,
'checkbook_reception_workflow', 'deliver_action') 'checkbook_reception_workflow', 'deliver_action')
self.failUnless(msg.find('The following references are already allocated') self.assertTrue(msg.find('The following references are already allocated')
>=0) >=0)
self.failUnless(msg.find('150')>=0) self.assertTrue(msg.find('150')>=0)
def stepDeliverCheckbookReception5(self, sequence=None, sequence_list=None, **kwd): def stepDeliverCheckbookReception5(self, sequence=None, sequence_list=None, **kwd):
""" """
......
...@@ -360,8 +360,8 @@ class TestERP5BankingCheckbookUsualCashTransfer(TestERP5BankingCheckbookUsualCas ...@@ -360,8 +360,8 @@ class TestERP5BankingCheckbookUsualCashTransfer(TestERP5BankingCheckbookUsualCas
""" """
message = self.assertWorkflowTransitionFails(self.checkbook_usual_cash_transfer, message = self.assertWorkflowTransitionFails(self.checkbook_usual_cash_transfer,
'checkbook_usual_cash_transfer_workflow','confirm_to_deliver_action') 'checkbook_usual_cash_transfer_workflow','confirm_to_deliver_action')
self.failUnless(message.find('Sorry, the item with reference')>=0) self.assertTrue(message.find('Sorry, the item with reference')>=0)
self.failUnless(message.find('is not available any more')>=0) self.assertTrue(message.find('is not available any more')>=0)
################################## ##################################
## Tests ## Tests
......
...@@ -358,8 +358,8 @@ class TestERP5BankingCheckbookVaultTransfer(TestERP5BankingCheckbookVaultTransfe ...@@ -358,8 +358,8 @@ class TestERP5BankingCheckbookVaultTransfer(TestERP5BankingCheckbookVaultTransfe
""" """
message = self.assertWorkflowTransitionFails(self.checkbook_vault_transfer, message = self.assertWorkflowTransitionFails(self.checkbook_vault_transfer,
'checkbook_vault_transfer_workflow','deliver_action') 'checkbook_vault_transfer_workflow','deliver_action')
self.failUnless(message.find('Sorry, the item with reference')>=0) self.assertTrue(message.find('Sorry, the item with reference')>=0)
self.failUnless(message.find('is not available any more')>=0) self.assertTrue(message.find('is not available any more')>=0)
################################## ##################################
## Tests ## Tests
......
...@@ -498,7 +498,7 @@ class TestERP5BankingClassificationSurvey(TestERP5BankingMixin): ...@@ -498,7 +498,7 @@ class TestERP5BankingClassificationSurvey(TestERP5BankingMixin):
""" """
message = self.assertWorkflowTransitionFails(self.classification_survey, message = self.assertWorkflowTransitionFails(self.classification_survey,
'classification_survey_workflow','deliver_action') 'classification_survey_workflow','deliver_action')
self.failUnless(message.find('Insufficient balance')>=0) self.assertTrue(message.find('Insufficient balance')>=0)
################################## ##################################
## Tests ## Tests
......
...@@ -485,7 +485,7 @@ class TestERP5BankingCounterRendering(TestERP5BankingMixin): ...@@ -485,7 +485,7 @@ class TestERP5BankingCounterRendering(TestERP5BankingMixin):
def stepDeliverFails(self, sequence=None, sequence_list=None, **kwd): def stepDeliverFails(self, sequence=None, sequence_list=None, **kwd):
message = self.assertWorkflowTransitionFails(self.counter_rendering, message = self.assertWorkflowTransitionFails(self.counter_rendering,
'counter_rendering_workflow','deliver_action') 'counter_rendering_workflow','deliver_action')
self.failUnless(message.find('Insufficient balance')>=0) self.assertTrue(message.find('Insufficient balance')>=0)
################################## ##################################
## Tests ## Tests
......
...@@ -420,7 +420,7 @@ class TestERP5BankingDestructionSurvey(TestERP5BankingMixin): ...@@ -420,7 +420,7 @@ class TestERP5BankingDestructionSurvey(TestERP5BankingMixin):
""" """
message = self.assertWorkflowTransitionFails(self.destruction_survey, message = self.assertWorkflowTransitionFails(self.destruction_survey,
'destruction_survey_workflow','deliver_action') 'destruction_survey_workflow','deliver_action')
self.failUnless(message.find('Insufficient balance')>=0) self.assertTrue(message.find('Insufficient balance')>=0)
################################## ##################################
## Tests ## Tests
......
...@@ -547,7 +547,7 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin): ...@@ -547,7 +547,7 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin):
cell = self.valid_line_1.getCell('emission_letter/p', variation, 'cash_status/retired') cell = self.valid_line_1.getCell('emission_letter/p', variation, 'cash_status/retired')
# check the portal type # check the portal type
self.assertEqual(cell.getPortalType(), 'Monetary Destruction Cell') self.assertEqual(cell.getPortalType(), 'Monetary Destruction Cell')
self.failUnless(cell.getBaobabDestinationVariationText().find('new_not_emitted')>=0) self.assertTrue(cell.getBaobabDestinationVariationText().find('new_not_emitted')>=0)
if cell.getId() == 'movement_0_0_0': if cell.getId() == 'movement_0_0_0':
# check the quantity for coin for year 1992 is 5 # check the quantity for coin for year 1992 is 5
self.assertEqual(cell.getQuantity(), 5.0) self.assertEqual(cell.getQuantity(), 5.0)
...@@ -982,7 +982,7 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin): ...@@ -982,7 +982,7 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin):
def stepValidateFails(self, sequence=None, sequence_list=None, **kwd): def stepValidateFails(self, sequence=None, sequence_list=None, **kwd):
message = self.assertWorkflowTransitionFails(self.monetary_destruction, message = self.assertWorkflowTransitionFails(self.monetary_destruction,
'monetary_destruction_workflow','plan_to_deliver_action') 'monetary_destruction_workflow','plan_to_deliver_action')
self.failUnless(message.find('Insufficient balance')>=0) self.assertTrue(message.find('Insufficient balance')>=0)
def stepResetInventoryForExterne(self, def stepResetInventoryForExterne(self,
sequence=None, sequence_list=None, **kwd): sequence=None, sequence_list=None, **kwd):
...@@ -994,7 +994,7 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin): ...@@ -994,7 +994,7 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin):
def stepDeliverFails(self, sequence=None, sequence_list=None, **kwd): def stepDeliverFails(self, sequence=None, sequence_list=None, **kwd):
message = self.assertWorkflowTransitionFails(self.monetary_destruction, message = self.assertWorkflowTransitionFails(self.monetary_destruction,
'monetary_destruction_workflow','deliver_action') 'monetary_destruction_workflow','deliver_action')
self.failUnless(message.find('Insufficient balance')>=0) self.assertTrue(message.find('Insufficient balance')>=0)
################################## ##################################
## Tests ## Tests
......
...@@ -305,7 +305,7 @@ class TestERP5BankingMonetaryIssue(TestERP5BankingMonetaryReceptionMixin): ...@@ -305,7 +305,7 @@ class TestERP5BankingMonetaryIssue(TestERP5BankingMonetaryReceptionMixin):
self.assertEqual(self.container_1.getCashNumberRangeStop(), '100') self.assertEqual(self.container_1.getCashNumberRangeStop(), '100')
self.assertEqual(len(self.container_1.getAggregateValueList()), 1) self.assertEqual(len(self.container_1.getAggregateValueList()), 1)
self.assertEqual(self.container_1.getAggregateValueList()[0], self.cash_container_item_1) self.assertEqual(self.container_1.getAggregateValueList()[0], self.cash_container_item_1)
# self.failUnless(self.container_1.getAggregateValueList()[0] == self.cash_container_item_1 or self.container_1.getAggregateValueList()[0] == self.cash_container_item_2) # self.assertTrue(self.container_1.getAggregateValueList()[0] == self.cash_container_item_1 or self.container_1.getAggregateValueList()[0] == self.cash_container_item_2)
self.assertEqual(len(self.container_1.objectIds()), 1) self.assertEqual(len(self.container_1.objectIds()), 1)
# now get the line and check it # now get the line and check it
self.container_line_1 = self.container_1.objectValues()[0] self.container_line_1 = self.container_1.objectValues()[0]
...@@ -342,7 +342,7 @@ class TestERP5BankingMonetaryIssue(TestERP5BankingMonetaryReceptionMixin): ...@@ -342,7 +342,7 @@ class TestERP5BankingMonetaryIssue(TestERP5BankingMonetaryReceptionMixin):
self.assertEqual(self.container_2.getCashNumberRangeStop(), '200') self.assertEqual(self.container_2.getCashNumberRangeStop(), '200')
self.assertEqual(len(self.container_2.getAggregateValueList()), 1) self.assertEqual(len(self.container_2.getAggregateValueList()), 1)
self.assertEqual(self.container_2.getAggregateValueList()[0], self.cash_container_item_2) self.assertEqual(self.container_2.getAggregateValueList()[0], self.cash_container_item_2)
# self.failUnless(self.container_2.getAggregateValueList()[0] == self.cash_container_item_2 or self.container_2.getAggregateValueList()[0] == self.cash_container_item_1) # self.assertTrue(self.container_2.getAggregateValueList()[0] == self.cash_container_item_2 or self.container_2.getAggregateValueList()[0] == self.cash_container_item_1)
self.assertEqual(len(self.container_2.objectIds()), 1) self.assertEqual(len(self.container_2.objectIds()), 1)
# now get the line and check it # now get the line and check it
self.container_line_2 = self.container_2.objectValues()[0] self.container_line_2 = self.container_2.objectValues()[0]
......
...@@ -540,7 +540,7 @@ class TestERP5BankingMonetaryRecall(TestERP5BankingMixin): ...@@ -540,7 +540,7 @@ class TestERP5BankingMonetaryRecall(TestERP5BankingMixin):
def stepDeliverFails(self, sequence=None, sequence_list=None, **kwd): def stepDeliverFails(self, sequence=None, sequence_list=None, **kwd):
message = self.assertWorkflowTransitionFails(self.monetary_recall, message = self.assertWorkflowTransitionFails(self.monetary_recall,
'monetary_recall_workflow','deliver_action') 'monetary_recall_workflow','deliver_action')
self.failUnless(message.find('Insufficient balance')>=0) self.assertTrue(message.find('Insufficient balance')>=0)
################################## ##################################
## Tests ## Tests
......
...@@ -448,7 +448,7 @@ class TestERP5BankingMonetarySurvey(TestERP5BankingMixin): ...@@ -448,7 +448,7 @@ class TestERP5BankingMonetarySurvey(TestERP5BankingMixin):
def stepDeliverMonetarySurveyFails(self, sequence=None, sequence_list=None, **kwd): def stepDeliverMonetarySurveyFails(self, sequence=None, sequence_list=None, **kwd):
message = self.assertWorkflowTransitionFails(self.monetary_survey, message = self.assertWorkflowTransitionFails(self.monetary_survey,
'monetary_survey_workflow','deliver_action') 'monetary_survey_workflow','deliver_action')
self.failUnless(message.find('Insufficient balance')>=0) self.assertTrue(message.find('Insufficient balance')>=0)
################################## ##################################
## Tests ## Tests
......
...@@ -484,7 +484,7 @@ class TestERP5BankingMoneyDepositRendering(TestERP5BankingMixin): ...@@ -484,7 +484,7 @@ class TestERP5BankingMoneyDepositRendering(TestERP5BankingMixin):
def stepDeliverFails(self, sequence=None, sequence_list=None, **kwd): def stepDeliverFails(self, sequence=None, sequence_list=None, **kwd):
message = self.assertWorkflowTransitionFails(self.money_deposit_rendering, message = self.assertWorkflowTransitionFails(self.money_deposit_rendering,
'money_deposit_rendering_workflow','deliver_action') 'money_deposit_rendering_workflow','deliver_action')
self.failUnless(message.find('Insufficient balance')>=0) self.assertTrue(message.find('Insufficient balance')>=0)
......
...@@ -554,7 +554,7 @@ class TestERP5BankingUsualCashRendering(TestERP5BankingMixin): ...@@ -554,7 +554,7 @@ class TestERP5BankingUsualCashRendering(TestERP5BankingMixin):
""" """
message = self.assertWorkflowTransitionFails(self.usual_cash_rendering, message = self.assertWorkflowTransitionFails(self.usual_cash_rendering,
'usual_cash_rendering_workflow','deliver_action') 'usual_cash_rendering_workflow','deliver_action')
self.failUnless(message.find('Insufficient balance')>=0) self.assertTrue(message.find('Insufficient balance')>=0)
def test_01_ERP5BankingUsualCashRendering(self, quiet=QUIET, run=RUN_ALL_TEST): def test_01_ERP5BankingUsualCashRendering(self, quiet=QUIET, run=RUN_ALL_TEST):
""" """
......
...@@ -485,7 +485,7 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin): ...@@ -485,7 +485,7 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin):
""" """
message = self.assertWorkflowTransitionFails(self.usual_cash_transfer, message = self.assertWorkflowTransitionFails(self.usual_cash_transfer,
'usual_cash_transfer_workflow','deliver_action') 'usual_cash_transfer_workflow','deliver_action')
self.failUnless(message.find('Insufficient balance')>=0) self.assertTrue(message.find('Insufficient balance')>=0)
################################## ##################################
......
...@@ -741,7 +741,7 @@ class TestERP5BankingVaultTransfer(TestERP5BankingMixin): ...@@ -741,7 +741,7 @@ class TestERP5BankingVaultTransfer(TestERP5BankingMixin):
""" """
message = self.assertWorkflowTransitionFails(self.vault_transfer, message = self.assertWorkflowTransitionFails(self.vault_transfer,
'vault_transfer_workflow','deliver_action') 'vault_transfer_workflow','deliver_action')
self.failUnless(message.find('Insufficient balance')>=0) self.assertTrue(message.find('Insufficient balance')>=0)
################################## ##################################
## Tests ## Tests
......
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