Commit 96751114 authored by Sebastien Robin's avatar Sebastien Robin

the insufficient balance message has changed a bit

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11458 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f0a9caad
...@@ -389,7 +389,7 @@ class TestERP5BankingCashMovement(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -389,7 +389,7 @@ class TestERP5BankingCashMovement(TestERP5BankingMixin, ERP5TypeTestCase):
self.assertEqual(len(workflow_history), 2) self.assertEqual(len(workflow_history), 2)
# check we get an "Insufficient balance" message in the workflow history because of the invalid line # check we get an "Insufficient balance" message in the workflow history because of the invalid line
msg = workflow_history[-1]['error_message'] 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): def stepTryPlanCashMovementWithBadInventory(self, sequence=None, sequence_list=None, **kwd):
...@@ -415,7 +415,7 @@ class TestERP5BankingCashMovement(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -415,7 +415,7 @@ class TestERP5BankingCashMovement(TestERP5BankingMixin, ERP5TypeTestCase):
self.assertEqual(len(workflow_history), 2) self.assertEqual(len(workflow_history), 2)
# check we get an "Insufficient balance" message in the workflow history because of the invalid line # check we get an "Insufficient balance" message in the workflow history because of the invalid line
msg = workflow_history[-1]['error_message'] 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): def stepDelInvalidLine(self, sequence=None, sequence_list=None, **kwd):
""" """
......
...@@ -386,7 +386,7 @@ class TestERP5BankingCounterRendering(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -386,7 +386,7 @@ class TestERP5BankingCounterRendering(TestERP5BankingMixin, ERP5TypeTestCase):
self.assertEqual(len(workflow_history), 2) self.assertEqual(len(workflow_history), 2)
# check we get an "Insufficient balance" message in the workflow history because of the invalid line # check we get an "Insufficient balance" message in the workflow history because of the invalid line
msg = workflow_history[-1]['error_message'] 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): def stepDelInvalidLine(self, sequence=None, sequence_list=None, **kwd):
......
...@@ -327,7 +327,7 @@ class TestERP5BankingDestructionSurvey(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -327,7 +327,7 @@ class TestERP5BankingDestructionSurvey(TestERP5BankingMixin, ERP5TypeTestCase):
self.assertEqual(len(workflow_history), 2) self.assertEqual(len(workflow_history), 2)
# check we get an "Insufficient balance" message in the workflow history because of the invalid line # check we get an "Insufficient balance" message in the workflow history because of the invalid line
msg = workflow_history[-1]['error_message'] 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): def stepDelInvalidLine(self, sequence=None, sequence_list=None, **kwd):
......
...@@ -157,6 +157,8 @@ class TestERP5BankingForeignCashReception(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -157,6 +157,8 @@ class TestERP5BankingForeignCashReception(TestERP5BankingMixin, ERP5TypeTestCase
resource_value=self.currency_1, resource_value=self.currency_1,
description='test', description='test',
source_total_asset_price=250) source_total_asset_price=250)
# set source reference
self.setDocumentSourceReference(self.foreign_cash_reception)
# execute tic # execute tic
self.stepTic() self.stepTic()
# get the cash inventory document # get the cash inventory document
......
...@@ -547,7 +547,7 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase) ...@@ -547,7 +547,7 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase)
self.assertEqual(len(workflow_history), 2) self.assertEqual(len(workflow_history), 2)
# check we get an "Insufficient balance" message in the workflow history because of the invalid line # check we get an "Insufficient balance" message in the workflow history because of the invalid line
msg = workflow_history[-1]['error_message'] 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): def stepDelInvalidLine(self, sequence=None, sequence_list=None, **kwd):
......
...@@ -394,7 +394,7 @@ class TestERP5BankingMonetaryRecall(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -394,7 +394,7 @@ class TestERP5BankingMonetaryRecall(TestERP5BankingMixin, ERP5TypeTestCase):
# check we get an "Insufficient balance" message in the workflow history because of the invalid line # check we get an "Insufficient balance" message in the workflow history because of the invalid line
msg = workflow_history[-1]['error_message'] msg = workflow_history[-1]['error_message']
#import pdb;pdb.set_trace() #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): def stepDelInvalidLine(self, sequence=None, sequence_list=None, **kwd):
......
...@@ -357,7 +357,7 @@ class TestERP5BankingMonetarySurvey(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -357,7 +357,7 @@ class TestERP5BankingMonetarySurvey(TestERP5BankingMixin, ERP5TypeTestCase):
self.assertEqual(len(workflow_history), 2) self.assertEqual(len(workflow_history), 2)
# check we get an "Insufficient balance" message in the workflow history because of the invalid line # check we get an "Insufficient balance" message in the workflow history because of the invalid line
msg = workflow_history[-1]['error_message'] 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): def stepDelInvalidLine(self, sequence=None, sequence_list=None, **kwd):
......
...@@ -392,7 +392,7 @@ class TestERP5BankingMoneyDepositRendering(TestERP5BankingMixin, ERP5TypeTestCas ...@@ -392,7 +392,7 @@ class TestERP5BankingMoneyDepositRendering(TestERP5BankingMixin, ERP5TypeTestCas
self.assertEqual(len(workflow_history), 4) self.assertEqual(len(workflow_history), 4)
# check we get an "Insufficient balance" message in the workflow history because of the invalid line # check we get an "Insufficient balance" message in the workflow history because of the invalid line
msg = workflow_history[-1]['error_message'] 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 ...@@ -418,7 +418,7 @@ class TestERP5BankingMoneyDepositRendering(TestERP5BankingMixin, ERP5TypeTestCas
self.assertEqual(len(workflow_history), 2) self.assertEqual(len(workflow_history), 2)
# check we get an "Insufficient balance" message in the workflow history because of the invalid line # check we get an "Insufficient balance" message in the workflow history because of the invalid line
msg = workflow_history[-1]['error_message'] 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): def stepDelInvalidLine(self, sequence=None, sequence_list=None, **kwd):
""" """
......
...@@ -146,11 +146,27 @@ class TestERP5BankingMoneyDepositTransfer(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -146,11 +146,27 @@ class TestERP5BankingMoneyDepositTransfer(TestERP5BankingMixin, ERP5TypeTestCase
line_list = [inventory_dict_line_1, inventory_dict_line_2] 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.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.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, self.createCashInventory(source=None, destination=self.counter, currency=self.currency_1,
line_list=line_list) 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): def stepCheckObjects(self, sequence=None, sequence_list=None, **kwd):
""" """
...@@ -366,7 +382,7 @@ class TestERP5BankingMoneyDepositTransfer(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -366,7 +382,7 @@ class TestERP5BankingMoneyDepositTransfer(TestERP5BankingMixin, ERP5TypeTestCase
self.assertEqual(len(workflow_history), 2) self.assertEqual(len(workflow_history), 2)
# check we get an "Insufficient balance" message in the workflow history because of the invalid line # check we get an "Insufficient balance" message in the workflow history because of the invalid line
msg = workflow_history[-1]['error_message'] 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): def stepDelInvalidLine(self, sequence=None, sequence_list=None, **kwd):
......
...@@ -386,7 +386,7 @@ class TestERP5BankingUsualCashRendering(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -386,7 +386,7 @@ class TestERP5BankingUsualCashRendering(TestERP5BankingMixin, ERP5TypeTestCase):
self.assertEqual(len(workflow_history), 2) self.assertEqual(len(workflow_history), 2)
# check we get an "Insufficient balance" message in the workflow history because of the invalid line # check we get an "Insufficient balance" message in the workflow history because of the invalid line
msg = workflow_history[-1]['error_message'] 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): def stepTryPlanUsualCashRenderingWithBadInventory(self, sequence=None, sequence_list=None, **kwd):
...@@ -410,7 +410,7 @@ class TestERP5BankingUsualCashRendering(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -410,7 +410,7 @@ class TestERP5BankingUsualCashRendering(TestERP5BankingMixin, ERP5TypeTestCase):
self.assertEqual(len(workflow_history), 2) self.assertEqual(len(workflow_history), 2)
# check we get an "Insufficient balance" message in the workflow history because of the invalid line # check we get an "Insufficient balance" message in the workflow history because of the invalid line
msg = workflow_history[-1]['error_message'] 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): def stepDelInvalidLine(self, sequence=None, sequence_list=None, **kwd):
""" """
......
...@@ -386,7 +386,7 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -386,7 +386,7 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase):
self.assertEqual(len(workflow_history), 2) self.assertEqual(len(workflow_history), 2)
# check we get an "Insufficient balance" message in the workflow history because of the invalid line # check we get an "Insufficient balance" message in the workflow history because of the invalid line
msg = workflow_history[-1]['error_message'] 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): def stepDelInvalidLine(self, sequence=None, sequence_list=None, **kwd):
......
...@@ -481,7 +481,7 @@ class TestERP5BankingVaultTransfer(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -481,7 +481,7 @@ class TestERP5BankingVaultTransfer(TestERP5BankingMixin, ERP5TypeTestCase):
self.assertEqual(len(workflow_history), 2) self.assertEqual(len(workflow_history), 2)
# check we get an "Insufficient balance" message in the workflow history because of the invalid line # check we get an "Insufficient balance" message in the workflow history because of the invalid line
msg = workflow_history[-1]['error_message'] 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): def stepTryPlanVaultTransferWithBadInventory(self, sequence=None, sequence_list=None, **kwd):
...@@ -505,7 +505,7 @@ class TestERP5BankingVaultTransfer(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -505,7 +505,7 @@ class TestERP5BankingVaultTransfer(TestERP5BankingMixin, ERP5TypeTestCase):
self.assertEqual(len(workflow_history), 2) self.assertEqual(len(workflow_history), 2)
# check we get an "Insufficient balance" message in the workflow history because of the invalid line # check we get an "Insufficient balance" message in the workflow history because of the invalid line
msg = workflow_history[-1]['error_message'] 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): def stepDelInvalidLine(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