diff --git a/product/ERP5Banking/tests/testERP5BankingCounterRendering.py b/product/ERP5Banking/tests/testERP5BankingCounterRendering.py index 366f454a671ac906e4eced7d4828c81fc043283b..0927eab4fdb59c391dcd7fa42fffed72116086bc 100644 --- a/product/ERP5Banking/tests/testERP5BankingCounterRendering.py +++ b/product/ERP5Banking/tests/testERP5BankingCounterRendering.py @@ -150,10 +150,25 @@ class TestERP5BankingCounterRendering(TestERP5BankingMixin, ERP5TypeTestCase): self.usual_cash = self.paris.surface.caisse_courante.encaisse_des_billets_et_monnaies self.counter = self.paris.surface.banque_interne.guichet_1.encaisse_des_billets_et_monnaies self.counter_vault = self.counter.sortante - self.openCounter(self.counter) - self.openCounterDate(site=self.paris) self.createCashInventory(source=None, destination=self.counter_vault, 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='paris', 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(site=self.counter) def stepCheckObjects(self, sequence=None, sequence_list=None, **kwd): diff --git a/product/ERP5Banking/tests/testERP5BankingMoneyDepositRendering.py b/product/ERP5Banking/tests/testERP5BankingMoneyDepositRendering.py index 6d24e59c09115331a84f9870c57f474f011dcef9..bba9ab3e6c7b1d718a9cc66f6f2e46eed4af60f8 100644 --- a/product/ERP5Banking/tests/testERP5BankingMoneyDepositRendering.py +++ b/product/ERP5Banking/tests/testERP5BankingMoneyDepositRendering.py @@ -148,11 +148,27 @@ class TestERP5BankingMoneyDepositRendering(TestERP5BankingMixin, ERP5TypeTestCas line_list = [inventory_dict_line_1, inventory_dict_line_2] self.gros_versement = self.paris.surface.gros_versement.guichet_1.encaisse_des_billets_et_monnaies.entrante + self.counter_vault = self.paris.surface.gros_versement.guichet_1 self.auxiliaire = self.paris.caveau.auxiliaire.encaisse_des_billets_et_monnaies - self.openCounterDate(site=self.paris) - self.openCounter(self.gros_versement) self.createCashInventory(source=None, destination=self.gros_versement, 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='paris', 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(site=self.counter_vault) def stepCheckObjects(self, sequence=None, sequence_list=None, **kwd):