Commit bfa1b268 authored by Sebastien Robin's avatar Sebastien Robin

specify the right resource when checking inventories on bank accounts

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14523 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c8ed9ba8
...@@ -124,8 +124,12 @@ class TestERP5BankingTravelerCheckPurchase(TestERP5BankingCheckbookUsualCashTran ...@@ -124,8 +124,12 @@ class TestERP5BankingTravelerCheckPurchase(TestERP5BankingCheckbookUsualCashTran
checkbook_object_list = [x.getObject() for x in checkbook_list] checkbook_object_list = [x.getObject() for x in checkbook_list]
self.failIfDifferentSet(checkbook_object_list,[]) self.failIfDifferentSet(checkbook_object_list,[])
# check the inventory of the bank account # check the inventory of the bank account
self.assertEqual(self.simulation_tool.getCurrentInventory(payment=self.bank_account_1.getRelativeUrl()), 67500) self.assertEqual(self.simulation_tool.getCurrentInventory(
self.assertEqual(self.simulation_tool.getFutureInventory(payment=self.bank_account_1.getRelativeUrl()), 67500) payment=self.bank_account_1.getRelativeUrl(),
resource=self.currency_1.getRelativeUrl()), 67500)
self.assertEqual(self.simulation_tool.getFutureInventory(
payment=self.bank_account_1.getRelativeUrl(),
resource=self.currency_1.getRelativeUrl()), 67500)
def stepCreateTravelerCheckPurchase(self, sequence=None, sequence_list=None, **kwd): def stepCreateTravelerCheckPurchase(self, sequence=None, sequence_list=None, **kwd):
""" """
...@@ -207,9 +211,11 @@ class TestERP5BankingTravelerCheckPurchase(TestERP5BankingCheckbookUsualCashTran ...@@ -207,9 +211,11 @@ class TestERP5BankingTravelerCheckPurchase(TestERP5BankingCheckbookUsualCashTran
self.assertEquals(len(checkbook_object_list),0) self.assertEquals(len(checkbook_object_list),0)
# check the inventory of the bank account # check the inventory of the bank account
self.assertEqual(self.simulation_tool.getCurrentInventory( self.assertEqual(self.simulation_tool.getCurrentInventory(
payment=self.bank_account_1.getRelativeUrl()), 100000) payment=self.bank_account_1.getRelativeUrl(),
resource=self.currency_1.getRelativeUrl()), 100000)
self.assertEqual(self.simulation_tool.getFutureInventory( self.assertEqual(self.simulation_tool.getFutureInventory(
payment=self.bank_account_1.getRelativeUrl()), 100000) payment=self.bank_account_1.getRelativeUrl(),
resource=self.currency_1.getRelativeUrl()), 100000)
################################## ##################################
## Tests ## Tests
......
...@@ -264,8 +264,12 @@ class TestERP5BankingTravelerCheckSale(TestERP5BankingCheckbookUsualCashTransfer ...@@ -264,8 +264,12 @@ class TestERP5BankingTravelerCheckSale(TestERP5BankingCheckbookUsualCashTransfer
checkbook_object_list = [x.getObject() for x in checkbook_list] checkbook_object_list = [x.getObject() for x in checkbook_list]
self.failIfDifferentSet(checkbook_object_list,[self.traveler_check]) self.failIfDifferentSet(checkbook_object_list,[self.traveler_check])
# check the inventory of the bank account # 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.getCurrentInventory(
self.assertEqual(self.simulation_tool.getFutureInventory(payment=self.bank_account_1.getRelativeUrl()), 100000) payment=self.bank_account_1.getRelativeUrl(),
resource=self.currency_1.getRelativeUrl()), 100000)
self.assertEqual(self.simulation_tool.getFutureInventory(
payment=self.bank_account_1.getRelativeUrl(),
resource=self.currency_1.getRelativeUrl()), 100000)
...@@ -288,9 +292,11 @@ class TestERP5BankingTravelerCheckSale(TestERP5BankingCheckbookUsualCashTransfer ...@@ -288,9 +292,11 @@ class TestERP5BankingTravelerCheckSale(TestERP5BankingCheckbookUsualCashTransfer
self.assertEquals(len(checkbook_object_list),0) self.assertEquals(len(checkbook_object_list),0)
# check the inventory of the bank account # check the inventory of the bank account
self.assertEqual(self.simulation_tool.getCurrentInventory( self.assertEqual(self.simulation_tool.getCurrentInventory(
payment=self.bank_account_1.getRelativeUrl()), 67500) payment=self.bank_account_1.getRelativeUrl(),
resource=self.currency_1.getRelativeUrl()), 67500)
self.assertEqual(self.simulation_tool.getFutureInventory( self.assertEqual(self.simulation_tool.getFutureInventory(
payment=self.bank_account_1.getRelativeUrl()), 67500) payment=self.bank_account_1.getRelativeUrl(),
resource=self.currency_1.getRelativeUrl()), 67500)
################################## ##################################
## 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