Commit 0b084862 authored by Aurel's avatar Aurel

change category in test to follow modification made on the module


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7645 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e9fd889c
......@@ -120,8 +120,9 @@ class TestERP5BankingCheckPayment(TestERP5BankingMixin, ERP5TypeTestCase):
'quantity': self.quantity_5000}
line_list = [inventory_dict_line_1, inventory_dict_line_2, inventory_dict_line_3]
self.bi_counter = self.paris.surface.banque_interne.guichet_1
self.createCashInventory(source=None, destination=self.bi_counter, currency=self.currency_1,
self.bi_counter = self.paris.surface.banque_interne
self.bi_counter_vault = self.paris.surface.banque_interne.guichet_1.encaisse_des_billets_et_monnaies.sortante
self.createCashInventory(source=None, destination=self.bi_counter_vault, currency=self.currency_1,
line_list=line_list)
self.stepTic()
# create a person and a bank account
......@@ -147,7 +148,7 @@ class TestERP5BankingCheckPayment(TestERP5BankingMixin, ERP5TypeTestCase):
# open counter date and counter
self.openCounterDate(site=self.paris)
self.openCounter(site=self.bi_counter)
self.openCounter(site=self.bi_counter_vault)
# 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
......@@ -157,7 +158,7 @@ class TestERP5BankingCheckPayment(TestERP5BankingMixin, ERP5TypeTestCase):
function='banking', group='baobab', site='testsite/paris')
# define the user
user_dict = {
'super_user' : [['Manager'], self.organisation, 'banking/comptable', 'baobab', 'testsite/paris']
'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)
......@@ -184,14 +185,14 @@ class TestERP5BankingCheckPayment(TestERP5BankingMixin, ERP5TypeTestCase):
"""
self.simulation_tool = self.getSimulationTool()
# check we have 5 banknotes of 10000 in encaisse_billets_et_monnaies
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.bi_counter.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 5.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.bi_counter.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 5.0)
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.bi_counter_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 5.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.bi_counter_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 5.0)
# check we have 12 coin of 200 in encaisse_billets_et_monnaies
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.bi_counter.getRelativeUrl(), resource = self.billet_200.getRelativeUrl()), 12.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.bi_counter.getRelativeUrl(), resource = self.billet_200.getRelativeUrl()), 12.0)
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.bi_counter_vault.getRelativeUrl(), resource = self.billet_200.getRelativeUrl()), 12.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.bi_counter_vault.getRelativeUrl(), resource = self.billet_200.getRelativeUrl()), 12.0)
# check we have 24 banknotes of 200 in encaisse_billets_et_monnaies
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.bi_counter.getRelativeUrl(), resource = self.billet_5000.getRelativeUrl()), 24.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.bi_counter.getRelativeUrl(), resource = self.billet_5000.getRelativeUrl()), 24.0)
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.bi_counter_vault.getRelativeUrl(), resource = self.billet_5000.getRelativeUrl()), 24.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.bi_counter_vault.getRelativeUrl(), resource = self.billet_5000.getRelativeUrl()), 24.0)
# check the inventory of the bank account
self.assertEqual(self.simulation_tool.getCurrentInventory(payment=self.bank_account_1.getRelativeUrl()), 100000)
self.assertEqual(self.simulation_tool.getFutureInventory(payment=self.bank_account_1.getRelativeUrl()), 100000)
......@@ -255,14 +256,14 @@ class TestERP5BankingCheckPayment(TestERP5BankingMixin, ERP5TypeTestCase):
"""
self.simulation_tool = self.getSimulationTool()
# check we have 5 banknotes of 10000 in encaisse_billets_et_monnaies
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.bi_counter.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 5.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.bi_counter.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 5.0)
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.bi_counter_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 5.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.bi_counter_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 5.0)
# check we have 12 coin of 200 in encaisse_billets_et_monnaies
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.bi_counter.getRelativeUrl(), resource = self.billet_200.getRelativeUrl()), 12.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.bi_counter.getRelativeUrl(), resource = self.billet_200.getRelativeUrl()), 12.0)
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.bi_counter_vault.getRelativeUrl(), resource = self.billet_200.getRelativeUrl()), 12.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.bi_counter_vault.getRelativeUrl(), resource = self.billet_200.getRelativeUrl()), 12.0)
# check we have 24 banknotes of 200 in encaisse_billets_et_monnaies
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.bi_counter.getRelativeUrl(), resource = self.billet_5000.getRelativeUrl()), 24.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.bi_counter.getRelativeUrl(), resource = self.billet_5000.getRelativeUrl()), 24.0)
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.bi_counter_vault.getRelativeUrl(), resource = self.billet_5000.getRelativeUrl()), 24.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.bi_counter_vault.getRelativeUrl(), resource = self.billet_5000.getRelativeUrl()), 24.0)
# check the inventory of the bank account, must be planned to be decrease by 20000
self.assertEqual(self.simulation_tool.getCurrentInventory(payment=self.bank_account_1.getRelativeUrl()), 100000)
self.assertEqual(self.simulation_tool.getFutureInventory(payment=self.bank_account_1.getRelativeUrl()), 80000)
......@@ -302,14 +303,14 @@ class TestERP5BankingCheckPayment(TestERP5BankingMixin, ERP5TypeTestCase):
"""
self.simulation_tool = self.getSimulationTool()
# check we have 5 banknotes of 10000 in encaisse_billets_et_monnaies
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.bi_counter.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 4.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.bi_counter.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 4.0)
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.bi_counter_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 4.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.bi_counter_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 4.0)
# check we have 12 coin of 200 in encaisse_billets_et_monnaies
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.bi_counter.getRelativeUrl(), resource = self.billet_200.getRelativeUrl()), 12.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.bi_counter.getRelativeUrl(), resource = self.billet_200.getRelativeUrl()), 12.0)
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.bi_counter_vault.getRelativeUrl(), resource = self.billet_200.getRelativeUrl()), 12.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.bi_counter_vault.getRelativeUrl(), resource = self.billet_200.getRelativeUrl()), 12.0)
# check we have 24 banknotes of 200 in encaisse_billets_et_monnaies
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.bi_counter.getRelativeUrl(), resource = self.billet_5000.getRelativeUrl()), 22.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.bi_counter.getRelativeUrl(), resource = self.billet_5000.getRelativeUrl()), 22.0)
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.bi_counter_vault.getRelativeUrl(), resource = self.billet_5000.getRelativeUrl()), 22.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.bi_counter_vault.getRelativeUrl(), resource = self.billet_5000.getRelativeUrl()), 22.0)
# check the final inventory of the bank account
self.assertEqual(self.simulation_tool.getCurrentInventory(payment=self.bank_account_1.getRelativeUrl()), 80000)
self.assertEqual(self.simulation_tool.getFutureInventory(payment=self.bank_account_1.getRelativeUrl()), 80000)
......
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