diff --git a/product/ERP5Banking/tests/testERP5BankingCashMovement.py b/product/ERP5Banking/tests/testERP5BankingCashMovement.py index d0991f42c387fb7cdcbe1cafcb5e784eb2383edc..c533253690d6c6002fb23a1759520a0a79d59972 100644 --- a/product/ERP5Banking/tests/testERP5BankingCashMovement.py +++ b/product/ERP5Banking/tests/testERP5BankingCashMovement.py @@ -389,7 +389,7 @@ class TestERP5BankingCashMovement(TestERP5BankingMixin, ERP5TypeTestCase): self.assertEqual(len(workflow_history), 2) # check we get an "Insufficient balance" message in the workflow history because of the invalid line msg = workflow_history[-1]['error_message'] - self.assertEqual('Insufficient Balance.', "%s" %(msg,)) + self.assertTrue('Insufficient balance' in "%s" %(msg,)) def stepTryPlanCashMovementWithBadInventory(self, sequence=None, sequence_list=None, **kwd): @@ -415,7 +415,7 @@ class TestERP5BankingCashMovement(TestERP5BankingMixin, ERP5TypeTestCase): self.assertEqual(len(workflow_history), 2) # check we get an "Insufficient balance" message in the workflow history because of the invalid line msg = workflow_history[-1]['error_message'] - self.assertEqual('Insufficient Balance.', "%s" %(msg,)) + self.assertTrue('Insufficient balance' in "%s" %(msg,)) def stepDelInvalidLine(self, sequence=None, sequence_list=None, **kwd): """ diff --git a/product/ERP5Banking/tests/testERP5BankingCounterRendering.py b/product/ERP5Banking/tests/testERP5BankingCounterRendering.py index d6b2b0624d02d17cd1458d82ab599e61502942b0..a4f5140ead07726afb5264164ebfded04f3933d6 100644 --- a/product/ERP5Banking/tests/testERP5BankingCounterRendering.py +++ b/product/ERP5Banking/tests/testERP5BankingCounterRendering.py @@ -386,7 +386,7 @@ class TestERP5BankingCounterRendering(TestERP5BankingMixin, ERP5TypeTestCase): self.assertEqual(len(workflow_history), 2) # check we get an "Insufficient balance" message in the workflow history because of the invalid line msg = workflow_history[-1]['error_message'] - self.assertEqual('Insufficient Balance.', "%s" %(msg,)) + self.assertTrue('Insufficient balance' in "%s" %(msg,)) def stepDelInvalidLine(self, sequence=None, sequence_list=None, **kwd): diff --git a/product/ERP5Banking/tests/testERP5BankingDestructionSurvey.py b/product/ERP5Banking/tests/testERP5BankingDestructionSurvey.py index 3e665bf6996b12a60b10fec633fd829c8c3aeca2..cf3fa967dde8c271dd2638ae19be4ee761962c0d 100644 --- a/product/ERP5Banking/tests/testERP5BankingDestructionSurvey.py +++ b/product/ERP5Banking/tests/testERP5BankingDestructionSurvey.py @@ -327,7 +327,7 @@ class TestERP5BankingDestructionSurvey(TestERP5BankingMixin, ERP5TypeTestCase): self.assertEqual(len(workflow_history), 2) # check we get an "Insufficient balance" message in the workflow history because of the invalid line msg = workflow_history[-1]['error_message'] - self.assertEqual('Insufficient Balance.', "%s" %(msg,)) + self.assertTrue('Insufficient balance' in "%s" %(msg,)) def stepDelInvalidLine(self, sequence=None, sequence_list=None, **kwd): diff --git a/product/ERP5Banking/tests/testERP5BankingForeignCashReception.py b/product/ERP5Banking/tests/testERP5BankingForeignCashReception.py index a04bc0e646e41f7dbc7a861b1050140604934916..4646bc45cc521575e95346748f18e28318302242 100755 --- a/product/ERP5Banking/tests/testERP5BankingForeignCashReception.py +++ b/product/ERP5Banking/tests/testERP5BankingForeignCashReception.py @@ -157,6 +157,8 @@ class TestERP5BankingForeignCashReception(TestERP5BankingMixin, ERP5TypeTestCase resource_value=self.currency_1, description='test', source_total_asset_price=250) + # set source reference + self.setDocumentSourceReference(self.foreign_cash_reception) # execute tic self.stepTic() # get the cash inventory document diff --git a/product/ERP5Banking/tests/testERP5BankingMonetaryDestruction.py b/product/ERP5Banking/tests/testERP5BankingMonetaryDestruction.py index ab370521103b386df4ae487ea41ed6cdb7402f78..75b35e8773f0b798b8a37da065b6d3a2d1b7719c 100644 --- a/product/ERP5Banking/tests/testERP5BankingMonetaryDestruction.py +++ b/product/ERP5Banking/tests/testERP5BankingMonetaryDestruction.py @@ -547,7 +547,7 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase) self.assertEqual(len(workflow_history), 2) # check we get an "Insufficient balance" message in the workflow history because of the invalid line msg = workflow_history[-1]['error_message'] - self.assertEqual('Insufficient Balance.', "%s" %(msg,)) + self.assertTrue('Insufficient balance' in "%s" %(msg,)) def stepDelInvalidLine(self, sequence=None, sequence_list=None, **kwd): diff --git a/product/ERP5Banking/tests/testERP5BankingMonetaryRecall.py b/product/ERP5Banking/tests/testERP5BankingMonetaryRecall.py index f660a5e68dd64fdaa65d466177f9bdd95d128e0c..a7e64793e04052f079152e1a6fa9fc9f94a7e506 100755 --- a/product/ERP5Banking/tests/testERP5BankingMonetaryRecall.py +++ b/product/ERP5Banking/tests/testERP5BankingMonetaryRecall.py @@ -394,7 +394,7 @@ class TestERP5BankingMonetaryRecall(TestERP5BankingMixin, ERP5TypeTestCase): # check we get an "Insufficient balance" message in the workflow history because of the invalid line msg = workflow_history[-1]['error_message'] #import pdb;pdb.set_trace() - self.assertEqual('Insufficient Balance.', "%s" %(msg,)) + self.assertTrue('Insufficient balance' in "%s" %(msg,)) def stepDelInvalidLine(self, sequence=None, sequence_list=None, **kwd): diff --git a/product/ERP5Banking/tests/testERP5BankingMonetarySurvey.py b/product/ERP5Banking/tests/testERP5BankingMonetarySurvey.py index 7bf706ddbf74d769ca86594ffc1d64cff00a4de6..734a46b39f872895e3f552e58d153828ae40b2f9 100755 --- a/product/ERP5Banking/tests/testERP5BankingMonetarySurvey.py +++ b/product/ERP5Banking/tests/testERP5BankingMonetarySurvey.py @@ -357,7 +357,7 @@ class TestERP5BankingMonetarySurvey(TestERP5BankingMixin, ERP5TypeTestCase): self.assertEqual(len(workflow_history), 2) # check we get an "Insufficient balance" message in the workflow history because of the invalid line msg = workflow_history[-1]['error_message'] - self.assertEqual('Insufficient Balance.', "%s" %(msg,)) + self.assertTrue('Insufficient balance' in "%s" %(msg,)) def stepDelInvalidLine(self, sequence=None, sequence_list=None, **kwd): diff --git a/product/ERP5Banking/tests/testERP5BankingMoneyDepositRendering.py b/product/ERP5Banking/tests/testERP5BankingMoneyDepositRendering.py index 52106e42d3625d867e5c163586931b065bbf500c..2093e4d805d6af53ae54750fb5927e812b533e9e 100644 --- a/product/ERP5Banking/tests/testERP5BankingMoneyDepositRendering.py +++ b/product/ERP5Banking/tests/testERP5BankingMoneyDepositRendering.py @@ -392,7 +392,7 @@ class TestERP5BankingMoneyDepositRendering(TestERP5BankingMixin, ERP5TypeTestCas self.assertEqual(len(workflow_history), 4) # check we get an "Insufficient balance" message in the workflow history because of the invalid line msg = workflow_history[-1]['error_message'] - self.assertEqual('Insufficient Balance.', "%s" %(msg,)) + self.assertTrue('Insufficient balance' in "%s" %(msg,)) @@ -418,7 +418,7 @@ class TestERP5BankingMoneyDepositRendering(TestERP5BankingMixin, ERP5TypeTestCas self.assertEqual(len(workflow_history), 2) # check we get an "Insufficient balance" message in the workflow history because of the invalid line msg = workflow_history[-1]['error_message'] - self.assertEqual('Insufficient Balance.', "%s" %(msg,)) + self.assertTrue('Insufficient balance' in "%s" %(msg,)) def stepDelInvalidLine(self, sequence=None, sequence_list=None, **kwd): """ diff --git a/product/ERP5Banking/tests/testERP5BankingMoneyDepositTransfer.py b/product/ERP5Banking/tests/testERP5BankingMoneyDepositTransfer.py index f7d86880fbd1822798016271138b08eafba2452d..95ebc82e8c47dd3d85397ddb717158f40a4eaf84 100644 --- a/product/ERP5Banking/tests/testERP5BankingMoneyDepositTransfer.py +++ b/product/ERP5Banking/tests/testERP5BankingMoneyDepositTransfer.py @@ -146,11 +146,27 @@ class TestERP5BankingMoneyDepositTransfer(TestERP5BankingMixin, ERP5TypeTestCase line_list = [inventory_dict_line_1, inventory_dict_line_2] self.counter = self.paris.surface.gros_versement.guichet_1.encaisse_des_billets_et_monnaies self.tri = self.paris.surface.salle_tri.encaisse_des_billets_et_monnaies - self.openCounterDate(site=self.paris) - self.openCounter(self.counter) self.createCashInventory(source=None, destination=self.counter, currency=self.currency_1, line_list=line_list) + # now we need to create a user as Manager to do the test + # in order to have an assigment defined which is used to do transition + # Create an Organisation that will be used for users assignment + self.checkUserFolderType() + self.organisation = self.organisation_module.newContent(id='baobab_org', portal_type='Organisation', + function='banking', group='baobab', site='testsite/paris') + # define the user + user_dict = { + 'super_user' : [['Manager'], self.organisation, 'banking/comptable', 'baobab', 'testsite/paris/surface/banque_interne/guichet_1'] + } + # call method to create this user + self.createERP5Users(user_dict) + self.logout() + self.login('super_user') + + # open counter date and counter + self.openCounterDate(site=self.paris) + self.openCounter(self.counter) def stepCheckObjects(self, sequence=None, sequence_list=None, **kwd): """ @@ -366,7 +382,7 @@ class TestERP5BankingMoneyDepositTransfer(TestERP5BankingMixin, ERP5TypeTestCase self.assertEqual(len(workflow_history), 2) # check we get an "Insufficient balance" message in the workflow history because of the invalid line msg = workflow_history[-1]['error_message'] - self.assertEqual('Insufficient Balance.', "%s" %(msg,)) + self.assertTrue('Insufficient balance' in "%s" %(msg,)) def stepDelInvalidLine(self, sequence=None, sequence_list=None, **kwd): diff --git a/product/ERP5Banking/tests/testERP5BankingUsualCashRendering.py b/product/ERP5Banking/tests/testERP5BankingUsualCashRendering.py index a9c88bca35833be5d8fa68e969fd4ae4e831a033..83eb566464a09bad613fe2c50ea8344b02add2f4 100644 --- a/product/ERP5Banking/tests/testERP5BankingUsualCashRendering.py +++ b/product/ERP5Banking/tests/testERP5BankingUsualCashRendering.py @@ -386,7 +386,7 @@ class TestERP5BankingUsualCashRendering(TestERP5BankingMixin, ERP5TypeTestCase): self.assertEqual(len(workflow_history), 2) # check we get an "Insufficient balance" message in the workflow history because of the invalid line msg = workflow_history[-1]['error_message'] - self.assertEqual('Insufficient Balance.', "%s" %(msg,)) + self.assertTrue('Insufficient balance' in "%s" %(msg,)) def stepTryPlanUsualCashRenderingWithBadInventory(self, sequence=None, sequence_list=None, **kwd): @@ -410,7 +410,7 @@ class TestERP5BankingUsualCashRendering(TestERP5BankingMixin, ERP5TypeTestCase): self.assertEqual(len(workflow_history), 2) # check we get an "Insufficient balance" message in the workflow history because of the invalid line msg = workflow_history[-1]['error_message'] - self.assertEqual('Insufficient Balance.', "%s" %(msg,)) + self.assertTrue('Insufficient balance' in "%s" %(msg,)) def stepDelInvalidLine(self, sequence=None, sequence_list=None, **kwd): """ diff --git a/product/ERP5Banking/tests/testERP5BankingUsualCashTransfer.py b/product/ERP5Banking/tests/testERP5BankingUsualCashTransfer.py index ff75adaf1c2ada57be44b77a2774b14fcdbea0c2..1bc689b8962ab26a0458488f4ab82001756e93fa 100755 --- a/product/ERP5Banking/tests/testERP5BankingUsualCashTransfer.py +++ b/product/ERP5Banking/tests/testERP5BankingUsualCashTransfer.py @@ -386,7 +386,7 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase): self.assertEqual(len(workflow_history), 2) # check we get an "Insufficient balance" message in the workflow history because of the invalid line msg = workflow_history[-1]['error_message'] - self.assertEqual('Insufficient Balance.', "%s" %(msg,)) + self.assertTrue('Insufficient balance' in "%s" %(msg,)) def stepDelInvalidLine(self, sequence=None, sequence_list=None, **kwd): diff --git a/product/ERP5Banking/tests/testERP5BankingVaultTransfer.py b/product/ERP5Banking/tests/testERP5BankingVaultTransfer.py index 8fe75d8dd61bfdcb2d7ebad9cefa8eeb8afd6d35..785787237ed679f53fd8c58c0e4c9810bbe49ea3 100644 --- a/product/ERP5Banking/tests/testERP5BankingVaultTransfer.py +++ b/product/ERP5Banking/tests/testERP5BankingVaultTransfer.py @@ -481,7 +481,7 @@ class TestERP5BankingVaultTransfer(TestERP5BankingMixin, ERP5TypeTestCase): self.assertEqual(len(workflow_history), 2) # check we get an "Insufficient balance" message in the workflow history because of the invalid line msg = workflow_history[-1]['error_message'] - self.assertEqual('Insufficient Balance.', "%s" %(msg,)) + self.assertTrue('Insufficient balance' in "%s" %(msg,)) def stepTryPlanVaultTransferWithBadInventory(self, sequence=None, sequence_list=None, **kwd): @@ -505,7 +505,7 @@ class TestERP5BankingVaultTransfer(TestERP5BankingMixin, ERP5TypeTestCase): self.assertEqual(len(workflow_history), 2) # check we get an "Insufficient balance" message in the workflow history because of the invalid line msg = workflow_history[-1]['error_message'] - self.assertEqual('Insufficient Balance.', "%s" %(msg,)) + self.assertTrue('Insufficient balance' in "%s" %(msg,)) def stepDelInvalidLine(self, sequence=None, sequence_list=None, **kwd): """