Commit 209cc54d authored by Vincent Pelletier's avatar Vincent Pelletier

Replace vault_[source|destination] by [reception|destination]_site.

vault_* is locally defined, where *_site is required by superclass anyway.
So avoid bloating namespace.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38100 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 58fe7df7
...@@ -80,10 +80,10 @@ class TestERP5BankingCashMovementNewNotEmitted(TestERP5BankingMonetaryReceptionM ...@@ -80,10 +80,10 @@ class TestERP5BankingCashMovementNewNotEmitted(TestERP5BankingMonetaryReceptionM
# Before the test, we need to input the inventory # Before the test, we need to input the inventory
self.vault_source = self.france.caveau.serre.encaisse_des_billets_neufs_non_emis_en_transit_allant_a.spain self.reception_site = self.france.caveau.serre.encaisse_des_billets_neufs_non_emis_en_transit_allant_a.spain
self.vault_destination = self.spain.caveau.serre.encaisse_des_billets_neufs_non_emis self.destination_site = self.spain.caveau.serre.encaisse_des_billets_neufs_non_emis
self.reception_site = self.reception = self.vault_source # Needed by TestERP5BankingMonetaryReceptionMixin
self.destination_site = self.vault_destination self.reception = self.reception_site
# Create an Organisation that will be used for users assignment # Create an Organisation that will be used for users assignment
self.checkUserFolderType() self.checkUserFolderType()
self.organisation = self.organisation_module.newContent(id='baobab_org', portal_type='Organisation', self.organisation = self.organisation_module.newContent(id='baobab_org', portal_type='Organisation',
...@@ -111,7 +111,7 @@ class TestERP5BankingCashMovementNewNotEmitted(TestERP5BankingMonetaryReceptionM ...@@ -111,7 +111,7 @@ class TestERP5BankingCashMovementNewNotEmitted(TestERP5BankingMonetaryReceptionM
self.cash_movement = self.cash_movement_module.newContent( self.cash_movement = self.cash_movement_module.newContent(
id='cash_movement_1', id='cash_movement_1',
portal_type='Cash Movement New Not Emitted', portal_type='Cash Movement New Not Emitted',
source=self.vault_source.getRelativeUrl(), source=self.reception_site.getRelativeUrl(),
destination_section_value=self.spain, destination_section_value=self.spain,
description='test', description='test',
start_date=self.date, start_date=self.date,
...@@ -225,8 +225,8 @@ class TestERP5BankingCashMovementNewNotEmitted(TestERP5BankingMonetaryReceptionM ...@@ -225,8 +225,8 @@ class TestERP5BankingCashMovementNewNotEmitted(TestERP5BankingMonetaryReceptionM
cell = self.valid_line_1.getCell('emission_letter/p', variation, 'cash_status/new_not_emitted') cell = self.valid_line_1.getCell('emission_letter/p', variation, 'cash_status/new_not_emitted')
self.assertEqual(cell.getPortalType(), 'Cash Delivery Cell') self.assertEqual(cell.getPortalType(), 'Cash Delivery Cell')
self.assertEqual(cell.getResourceValue(), self.billet_10000) self.assertEqual(cell.getResourceValue(), self.billet_10000)
self.assertEqual(cell.getBaobabSourceValue(), self.vault_source) self.assertEqual(cell.getBaobabSourceValue(), self.reception_site)
self.assertEqual(cell.getBaobabDestinationValue(), self.vault_destination) self.assertEqual(cell.getBaobabDestinationValue(), self.destination_site)
self.assertEqual(cell.getQuantity(), 200.0) self.assertEqual(cell.getQuantity(), 200.0)
...@@ -261,9 +261,9 @@ class TestERP5BankingCashMovementNewNotEmitted(TestERP5BankingMonetaryReceptionM ...@@ -261,9 +261,9 @@ class TestERP5BankingCashMovementNewNotEmitted(TestERP5BankingMonetaryReceptionM
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(cell.getPrice(), 10000.0) self.assertEqual(cell.getPrice(), 10000.0)
# check the source vault is caisse_1 # check the source vault is caisse_1
self.assertEqual(cell.getBaobabSourceValue(), self.vault_source) self.assertEqual(cell.getBaobabSourceValue(), self.reception_site)
# check the destination vault is caisse_2 # check the destination vault is caisse_2
self.assertEqual(cell.getBaobabDestinationValue(), self.vault_destination) #self.assertEqual(cell.getBaobabDestinationValue(), self.destination_site)
self.assertEqual(cell.getQuantity(), 100.0) self.assertEqual(cell.getQuantity(), 100.0)
...@@ -298,8 +298,8 @@ class TestERP5BankingCashMovementNewNotEmitted(TestERP5BankingMonetaryReceptionM ...@@ -298,8 +298,8 @@ class TestERP5BankingCashMovementNewNotEmitted(TestERP5BankingMonetaryReceptionM
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(cell.getPrice(), 10000.0) self.assertEqual(cell.getPrice(), 10000.0)
# check the source vault is caisse_1 # check the source vault is caisse_1
self.assertEqual(cell.getBaobabSourceValue(), self.vault_source) self.assertEqual(cell.getBaobabSourceValue(), self.reception_site)
self.assertEqual(cell.getBaobabDestinationValue(), self.vault_destination) self.assertEqual(cell.getBaobabDestinationValue(), self.destination_site)
self.assertEqual(cell.getQuantity(), 100.0) self.assertEqual(cell.getQuantity(), 100.0)
...@@ -308,14 +308,14 @@ class TestERP5BankingCashMovementNewNotEmitted(TestERP5BankingMonetaryReceptionM ...@@ -308,14 +308,14 @@ class TestERP5BankingCashMovementNewNotEmitted(TestERP5BankingMonetaryReceptionM
Check that compution of inventory at vault caisse_2 is right after confirm and before deliver Check that compution of inventory at vault caisse_2 is right after confirm and before deliver
""" """
# check source # check source
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.reception.getRelativeUrl(), self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.reception_site.getRelativeUrl(),
resource = self.billet_10000.getRelativeUrl()), 0.0) resource = self.billet_10000.getRelativeUrl()), 0.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.reception.getRelativeUrl(), self.assertEqual(self.simulation_tool.getFutureInventory(node=self.reception_site.getRelativeUrl(),
resource = self.billet_10000.getRelativeUrl()), 0.0) resource = self.billet_10000.getRelativeUrl()), 0.0)
# check destination # check destination
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.vault_destination.getRelativeUrl(), self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.destination_site.getRelativeUrl(),
resource = self.billet_10000.getRelativeUrl()), 200.0) resource = self.billet_10000.getRelativeUrl()), 200.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.vault_destination.getRelativeUrl(), self.assertEqual(self.simulation_tool.getFutureInventory(node=self.destination_site.getRelativeUrl(),
resource = self.billet_10000.getRelativeUrl()), 200.0) resource = self.billet_10000.getRelativeUrl()), 200.0)
def stepCheckFinalContainerInventory(self, sequence=None, sequence_list=None, **kw): def stepCheckFinalContainerInventory(self, sequence=None, sequence_list=None, **kw):
......
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