Commit 8e9a542e authored by Sebastien Robin's avatar Sebastien Robin

test that the quantity_unit is unit, not quantity_unit/unit

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10403 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8691c08a
...@@ -292,10 +292,11 @@ class TestERP5BankingMixin: ...@@ -292,10 +292,11 @@ class TestERP5BankingMixin:
start_date='01/01/1900',stop_date='01/01/2900', start_date='01/01/1900',stop_date='01/01/2900',
price_currency='currency_module/EUR', price_currency='currency_module/EUR',
currency_exchange_type_list=['currency_exchange_type/sale', currency_exchange_type_list=['currency_exchange_type/sale',
'currency_exchange_type/purchase'], 'currency_exchange_type/purchase',
'currency_exchange_type/transfer'],
base_price=2) base_price=2)
cell_list = exchange_line.objectValues() cell_list = exchange_line.objectValues()
self.assertEquals(len(cell_list),2) self.assertEquals(len(cell_list),3)
for cell in cell_list: for cell in cell_list:
cell.setBasePrice(650.0) cell.setBasePrice(650.0)
cell.setDiscount(650.0) cell.setDiscount(650.0)
...@@ -438,6 +439,7 @@ class TestERP5BankingMixin: ...@@ -438,6 +439,7 @@ class TestERP5BankingMixin:
self.currency_exchange_type = getattr(self.category_tool,'currency_exchange_type') self.currency_exchange_type = getattr(self.category_tool,'currency_exchange_type')
self.currency_exchange_type.newContent(id='sale') self.currency_exchange_type.newContent(id='sale')
self.currency_exchange_type.newContent(id='purchase') self.currency_exchange_type.newContent(id='purchase')
self.currency_exchange_type.newContent(id='transfer')
# get the base category function # get the base category function
self.function_base_category = getattr(self.category_tool, 'function') self.function_base_category = getattr(self.category_tool, 'function')
...@@ -684,6 +686,7 @@ class TestERP5BankingMixin: ...@@ -684,6 +686,7 @@ class TestERP5BankingMixin:
""" """
return self.checkbook_model_module.newContent(id = id, return self.checkbook_model_module.newContent(id = id,
portal_type = 'Check Model', portal_type = 'Check Model',
title = 'Check',
) )
def createCheck(self, id, reference, checkbook,bank_account=None): def createCheck(self, id, reference, checkbook,bank_account=None):
...@@ -700,6 +703,21 @@ class TestERP5BankingMixin: ...@@ -700,6 +703,21 @@ class TestERP5BankingMixin:
check.confirm() check.confirm()
return check return check
def createTravelerCheckModel(self, id):
"""
Create a checkbook for the given bank account
"""
model = self.checkbook_model_module.newContent(id = id,
title = 'USD Traveler Check',
portal_type = 'Check Model',
fixed_price = 1
)
variation = model.newContent(id='variant_1',
portal_type='Check Model Type Variation',
price=50)
model.setPriceCurrency(self.currency_2)
return model
def createCashContainer(self, document, container_portal_type, global_dict, line_list, delivery_line_type='Cash Delivery Line'): def createCashContainer(self, document, container_portal_type, global_dict, line_list, delivery_line_type='Cash Delivery Line'):
""" """
Create a cash container Create a cash container
......
...@@ -251,7 +251,7 @@ class TestERP5BankingAccountIncident(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -251,7 +251,7 @@ class TestERP5BankingAccountIncident(TestERP5BankingMixin, ERP5TypeTestCase):
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_line_1.getPrice(), 10000.0) self.assertEqual(self.valid_line_1.getPrice(), 10000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_line_1.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_1.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_1.objectValues()), 2) self.assertEqual(len(self.valid_line_1.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -309,7 +309,7 @@ class TestERP5BankingAccountIncident(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -309,7 +309,7 @@ class TestERP5BankingAccountIncident(TestERP5BankingMixin, ERP5TypeTestCase):
# check the value of coin # check the value of coin
self.assertEqual(self.valid_line_2.getPrice(), 200.0) self.assertEqual(self.valid_line_2.getPrice(), 200.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_line_2.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_2.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_2.objectValues()), 2) self.assertEqual(len(self.valid_line_2.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
......
...@@ -334,7 +334,7 @@ class TestERP5BankingCashBalanceRegulation(TestERP5BankingMixin, ERP5TypeTestCas ...@@ -334,7 +334,7 @@ class TestERP5BankingCashBalanceRegulation(TestERP5BankingMixin, ERP5TypeTestCas
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_incoming_line.getPrice(), 10000.0) self.assertEqual(self.valid_incoming_line.getPrice(), 10000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_incoming_line.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_incoming_line.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_incoming_line.objectValues()), 2) self.assertEqual(len(self.valid_incoming_line.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -375,7 +375,7 @@ class TestERP5BankingCashBalanceRegulation(TestERP5BankingMixin, ERP5TypeTestCas ...@@ -375,7 +375,7 @@ class TestERP5BankingCashBalanceRegulation(TestERP5BankingMixin, ERP5TypeTestCas
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_incoming_line.getPrice(), 200.0) self.assertEqual(self.valid_incoming_line.getPrice(), 200.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_incoming_line.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_incoming_line.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_incoming_line.objectValues()), 2) self.assertEqual(len(self.valid_incoming_line.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -435,7 +435,7 @@ class TestERP5BankingCashBalanceRegulation(TestERP5BankingMixin, ERP5TypeTestCas ...@@ -435,7 +435,7 @@ class TestERP5BankingCashBalanceRegulation(TestERP5BankingMixin, ERP5TypeTestCas
# check the value of coin # check the value of coin
self.assertEqual(self.valid_outgoing_line.getPrice(), 5000.0) self.assertEqual(self.valid_outgoing_line.getPrice(), 5000.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_outgoing_line.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_outgoing_line.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_outgoing_line.objectValues()), 2) self.assertEqual(len(self.valid_outgoing_line.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
...@@ -469,7 +469,7 @@ class TestERP5BankingCashBalanceRegulation(TestERP5BankingMixin, ERP5TypeTestCas ...@@ -469,7 +469,7 @@ class TestERP5BankingCashBalanceRegulation(TestERP5BankingMixin, ERP5TypeTestCas
# check the value of coin # check the value of coin
self.assertEqual(self.valid_outgoing_line.getPrice(), 100.0) self.assertEqual(self.valid_outgoing_line.getPrice(), 100.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_outgoing_line.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_outgoing_line.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_outgoing_line.objectValues()), 2) self.assertEqual(len(self.valid_outgoing_line.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
......
...@@ -261,7 +261,7 @@ class TestERP5BankingCashClassification(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -261,7 +261,7 @@ class TestERP5BankingCashClassification(TestERP5BankingMixin, ERP5TypeTestCase):
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_incoming_line.getPrice(), 10000.0) self.assertEqual(self.valid_incoming_line.getPrice(), 10000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_incoming_line.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_incoming_line.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_incoming_line.objectValues()), 2) self.assertEqual(len(self.valid_incoming_line.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -301,7 +301,7 @@ class TestERP5BankingCashClassification(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -301,7 +301,7 @@ class TestERP5BankingCashClassification(TestERP5BankingMixin, ERP5TypeTestCase):
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_incoming_line.getPrice(), 200.0) self.assertEqual(self.valid_incoming_line.getPrice(), 200.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_incoming_line.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_incoming_line.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_incoming_line.objectValues()), 2) self.assertEqual(len(self.valid_incoming_line.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -341,7 +341,7 @@ class TestERP5BankingCashClassification(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -341,7 +341,7 @@ class TestERP5BankingCashClassification(TestERP5BankingMixin, ERP5TypeTestCase):
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_incoming_line.getPrice(), 5000.0) self.assertEqual(self.valid_incoming_line.getPrice(), 5000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_incoming_line.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_incoming_line.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_incoming_line.objectValues()), 2) self.assertEqual(len(self.valid_incoming_line.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -399,7 +399,7 @@ class TestERP5BankingCashClassification(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -399,7 +399,7 @@ class TestERP5BankingCashClassification(TestERP5BankingMixin, ERP5TypeTestCase):
# check the value of coin # check the value of coin
self.assertEqual(self.valid_outgoing_line.getPrice(), 10000.0) self.assertEqual(self.valid_outgoing_line.getPrice(), 10000.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_outgoing_line.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_outgoing_line.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_outgoing_line.objectValues()), 2) self.assertEqual(len(self.valid_outgoing_line.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
...@@ -438,7 +438,7 @@ class TestERP5BankingCashClassification(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -438,7 +438,7 @@ class TestERP5BankingCashClassification(TestERP5BankingMixin, ERP5TypeTestCase):
# check the value of coin # check the value of coin
self.assertEqual(self.valid_outgoing_line.getPrice(), 200.0) self.assertEqual(self.valid_outgoing_line.getPrice(), 200.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_outgoing_line.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_outgoing_line.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_outgoing_line.objectValues()), 2) self.assertEqual(len(self.valid_outgoing_line.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
...@@ -477,7 +477,7 @@ class TestERP5BankingCashClassification(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -477,7 +477,7 @@ class TestERP5BankingCashClassification(TestERP5BankingMixin, ERP5TypeTestCase):
# check the value of coin # check the value of coin
self.assertEqual(self.valid_outgoing_line.getPrice(), 5000.0) self.assertEqual(self.valid_outgoing_line.getPrice(), 5000.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_outgoing_line.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_outgoing_line.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_outgoing_line.objectValues()), 2) self.assertEqual(len(self.valid_outgoing_line.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
......
...@@ -269,7 +269,7 @@ class TestERP5BankingCashExchange(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -269,7 +269,7 @@ class TestERP5BankingCashExchange(TestERP5BankingMixin, ERP5TypeTestCase):
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_incoming_line.getPrice(), 10000.0) self.assertEqual(self.valid_incoming_line.getPrice(), 10000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_incoming_line.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_incoming_line.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_incoming_line.objectValues()), 2) self.assertEqual(len(self.valid_incoming_line.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -309,7 +309,7 @@ class TestERP5BankingCashExchange(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -309,7 +309,7 @@ class TestERP5BankingCashExchange(TestERP5BankingMixin, ERP5TypeTestCase):
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_incoming_line.getPrice(), 200.0) self.assertEqual(self.valid_incoming_line.getPrice(), 200.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_incoming_line.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_incoming_line.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_incoming_line.objectValues()), 2) self.assertEqual(len(self.valid_incoming_line.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -368,7 +368,7 @@ class TestERP5BankingCashExchange(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -368,7 +368,7 @@ class TestERP5BankingCashExchange(TestERP5BankingMixin, ERP5TypeTestCase):
# check the value of coin # check the value of coin
self.assertEqual(self.valid_outgoing_line.getPrice(), 5000.0) self.assertEqual(self.valid_outgoing_line.getPrice(), 5000.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_outgoing_line.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_outgoing_line.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_outgoing_line.objectValues()), 2) self.assertEqual(len(self.valid_outgoing_line.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
...@@ -406,7 +406,7 @@ class TestERP5BankingCashExchange(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -406,7 +406,7 @@ class TestERP5BankingCashExchange(TestERP5BankingMixin, ERP5TypeTestCase):
# check the value of coin # check the value of coin
self.assertEqual(self.valid_outgoing_line.getPrice(), 100.0) self.assertEqual(self.valid_outgoing_line.getPrice(), 100.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_outgoing_line.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_outgoing_line.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_outgoing_line.objectValues()), 2) self.assertEqual(len(self.valid_outgoing_line.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
......
...@@ -220,7 +220,7 @@ class TestERP5BankingCashIncident(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -220,7 +220,7 @@ class TestERP5BankingCashIncident(TestERP5BankingMixin, ERP5TypeTestCase):
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_line_1.getPrice(), 10000.0) self.assertEqual(self.valid_line_1.getPrice(), 10000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_line_1.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_1.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_1.objectValues()), 2) self.assertEqual(len(self.valid_line_1.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -278,7 +278,7 @@ class TestERP5BankingCashIncident(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -278,7 +278,7 @@ class TestERP5BankingCashIncident(TestERP5BankingMixin, ERP5TypeTestCase):
# check the value of coin # check the value of coin
self.assertEqual(self.valid_line_2.getPrice(), 200.0) self.assertEqual(self.valid_line_2.getPrice(), 200.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_line_2.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_2.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_2.objectValues()), 2) self.assertEqual(len(self.valid_line_2.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
......
...@@ -242,7 +242,7 @@ class TestERP5BankingInventory(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -242,7 +242,7 @@ class TestERP5BankingInventory(TestERP5BankingMixin, ERP5TypeTestCase):
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_line_1.getPrice(), 10000.0) self.assertEqual(self.valid_line_1.getPrice(), 10000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_line_1.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_1.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_1.objectValues()), 2) self.assertEqual(len(self.valid_line_1.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -299,7 +299,7 @@ class TestERP5BankingInventory(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -299,7 +299,7 @@ class TestERP5BankingInventory(TestERP5BankingMixin, ERP5TypeTestCase):
# check the value of coin # check the value of coin
self.assertEqual(self.valid_line_2.getPrice(), 200.0) self.assertEqual(self.valid_line_2.getPrice(), 200.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_line_2.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_2.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_2.objectValues()), 2) self.assertEqual(len(self.valid_line_2.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
...@@ -358,7 +358,7 @@ class TestERP5BankingInventory(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -358,7 +358,7 @@ class TestERP5BankingInventory(TestERP5BankingMixin, ERP5TypeTestCase):
# check the value of coin # check the value of coin
self.assertEqual(self.valid_line_3.getPrice(), 5000.0) self.assertEqual(self.valid_line_3.getPrice(), 5000.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_line_3.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_3.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_3.objectValues()), 2) self.assertEqual(len(self.valid_line_3.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
......
...@@ -261,7 +261,7 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -261,7 +261,7 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin, ERP5TypeTestCase):
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_incoming_line.getPrice(), 10000.0) self.assertEqual(self.valid_incoming_line.getPrice(), 10000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_incoming_line.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_incoming_line.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_incoming_line.objectValues()), 2) self.assertEqual(len(self.valid_incoming_line.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -301,7 +301,7 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -301,7 +301,7 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin, ERP5TypeTestCase):
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_incoming_line.getPrice(), 200.0) self.assertEqual(self.valid_incoming_line.getPrice(), 200.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_incoming_line.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_incoming_line.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_incoming_line.objectValues()), 2) self.assertEqual(len(self.valid_incoming_line.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -341,7 +341,7 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -341,7 +341,7 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin, ERP5TypeTestCase):
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_incoming_line.getPrice(), 5000.0) self.assertEqual(self.valid_incoming_line.getPrice(), 5000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_incoming_line.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_incoming_line.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_incoming_line.objectValues()), 2) self.assertEqual(len(self.valid_incoming_line.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -399,7 +399,7 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -399,7 +399,7 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin, ERP5TypeTestCase):
# check the value of coin # check the value of coin
self.assertEqual(self.valid_outgoing_line.getPrice(), 10000.0) self.assertEqual(self.valid_outgoing_line.getPrice(), 10000.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_outgoing_line.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_outgoing_line.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_outgoing_line.objectValues()), 2) self.assertEqual(len(self.valid_outgoing_line.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
...@@ -438,7 +438,7 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -438,7 +438,7 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin, ERP5TypeTestCase):
# check the value of coin # check the value of coin
self.assertEqual(self.valid_outgoing_line.getPrice(), 200.0) self.assertEqual(self.valid_outgoing_line.getPrice(), 200.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_outgoing_line.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_outgoing_line.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_outgoing_line.objectValues()), 2) self.assertEqual(len(self.valid_outgoing_line.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
...@@ -477,7 +477,7 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -477,7 +477,7 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin, ERP5TypeTestCase):
# check the value of coin # check the value of coin
self.assertEqual(self.valid_outgoing_line.getPrice(), 5000.0) self.assertEqual(self.valid_outgoing_line.getPrice(), 5000.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_outgoing_line.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_outgoing_line.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_outgoing_line.objectValues()), 2) self.assertEqual(len(self.valid_outgoing_line.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
......
...@@ -231,7 +231,7 @@ class TestERP5BankingCashSortingIncident(TestERP5BankingMixin, ERP5TypeTestCase) ...@@ -231,7 +231,7 @@ class TestERP5BankingCashSortingIncident(TestERP5BankingMixin, ERP5TypeTestCase)
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_line_1.getPrice(), 10000.0) self.assertEqual(self.valid_line_1.getPrice(), 10000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_line_1.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_1.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_1.objectValues()), 2) self.assertEqual(len(self.valid_line_1.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -289,7 +289,7 @@ class TestERP5BankingCashSortingIncident(TestERP5BankingMixin, ERP5TypeTestCase) ...@@ -289,7 +289,7 @@ class TestERP5BankingCashSortingIncident(TestERP5BankingMixin, ERP5TypeTestCase)
# check the value of coin # check the value of coin
self.assertEqual(self.valid_line_2.getPrice(), 200.0) self.assertEqual(self.valid_line_2.getPrice(), 200.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_line_2.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_2.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_2.objectValues()), 2) self.assertEqual(len(self.valid_line_2.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
......
...@@ -101,6 +101,7 @@ class TestERP5BankingCheckbookReception(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -101,6 +101,7 @@ class TestERP5BankingCheckbookReception(TestERP5BankingMixin, ERP5TypeTestCase):
self.createManagerAndLogin() self.createManagerAndLogin()
self.createFunctionGroupSiteCategory() self.createFunctionGroupSiteCategory()
self.checkbook_model_1 = self.createCheckbookModel('checkbook_model_1') self.checkbook_model_1 = self.createCheckbookModel('checkbook_model_1')
self.traveler_check_model = self.createTravelerCheckModel('traveler_check_model')
self.check_model_1 = self.createCheckModel('check_model_1') self.check_model_1 = self.createCheckModel('check_model_1')
self.reception = self.paris.caveau.auxiliaire.encaisse_des_billets_et_monnaies self.reception = self.paris.caveau.auxiliaire.encaisse_des_billets_et_monnaies
self.destination_site = self.paris self.destination_site = self.paris
......
...@@ -60,10 +60,7 @@ class TestERP5BankingCheckbookUsualCashTransferMixin( ...@@ -60,10 +60,7 @@ class TestERP5BankingCheckbookUsualCashTransferMixin(
id='checkbook_vault_transfer', portal_type='Checkbook Vault Transfer', id='checkbook_vault_transfer', portal_type='Checkbook Vault Transfer',
source_value=self.vault_transfer_source_site, source_value=self.vault_transfer_source_site,
destination_value=self.vault_transfer_destination_site, destination_value=self.vault_transfer_destination_site,
resource_value=self.currency_1,
start_date=(self.date-3)) start_date=(self.date-3))
# get the checkbook vault transfer document
self.checkbook_vault_transfer = getattr(self.getCheckbookVaultTransferModule(), 'checkbook_vault_transfer')
# Add a line for check and checkbook # Add a line for check and checkbook
self.line_1 = self.checkbook_vault_transfer.newContent(quantity=1, self.line_1 = self.checkbook_vault_transfer.newContent(quantity=1,
resource_value=self.checkbook_model_1, resource_value=self.checkbook_model_1,
...@@ -86,6 +83,31 @@ class TestERP5BankingCheckbookUsualCashTransferMixin( ...@@ -86,6 +83,31 @@ class TestERP5BankingCheckbookUsualCashTransferMixin(
self.workflow_tool.doActionFor(self.checkbook_vault_transfer, 'confirm_to_deliver_action', self.workflow_tool.doActionFor(self.checkbook_vault_transfer, 'confirm_to_deliver_action',
wf_id='checkbook_vault_transfer_workflow') wf_id='checkbook_vault_transfer_workflow')
def createCheckbookVaultTransferWithTravelerCheck(self, sequence=None,
sequence_list=None, **kwd):
"""
Create a checkbook Reception
We do not need to check it because it is already done in another unit test.
"""
self.checkbook_vault_transfer = self.getCheckbookVaultTransferModule().newContent(
id='checkbook_vault_transfer', portal_type='Checkbook Vault Transfer',
source_value=self.vault_transfer_source_site,
destination_value=self.vault_transfer_destination_site,
start_date=(self.date-3))
# Add a line for traveler check
self.line_2 = self.checkbook_vault_transfer.newContent(quantity=1,
resource_value=self.traveler_check_model,
check_amount_value=self.traveler_check_model.variant_1,
aggregate_value=self.traveler_check,
)
self.workflow_tool.doActionFor(self.checkbook_vault_transfer, 'plan_action',
wf_id='checkbook_vault_transfer_workflow')
self.workflow_tool.doActionFor(self.checkbook_vault_transfer, 'order_action',
wf_id='checkbook_vault_transfer_workflow')
self.workflow_tool.doActionFor(self.checkbook_vault_transfer, 'confirm_action',
wf_id='checkbook_vault_transfer_workflow')
self.workflow_tool.doActionFor(self.checkbook_vault_transfer, 'confirm_to_deliver_action',
wf_id='checkbook_vault_transfer_workflow')
class TestERP5BankingCheckbookUsualCashTransfer(TestERP5BankingCheckbookUsualCashTransferMixin, class TestERP5BankingCheckbookUsualCashTransfer(TestERP5BankingCheckbookUsualCashTransferMixin,
......
...@@ -54,7 +54,6 @@ class TestERP5BankingCheckbookVaultTransferMixin: ...@@ -54,7 +54,6 @@ class TestERP5BankingCheckbookVaultTransferMixin:
self.checkbook_reception = self.checkbook_reception_module.newContent( self.checkbook_reception = self.checkbook_reception_module.newContent(
id='checkbook_reception', portal_type='Checkbook Reception', id='checkbook_reception', portal_type='Checkbook Reception',
source_value=None, destination_value=self.reception_destination_site, source_value=None, destination_value=self.reception_destination_site,
resource_value=self.currency_1,
start_date=(self.date-4)) start_date=(self.date-4))
# get the checkbook reception document # get the checkbook reception document
self.checkbook_reception = getattr(self.checkbook_reception_module, 'checkbook_reception') self.checkbook_reception = getattr(self.checkbook_reception_module, 'checkbook_reception')
...@@ -78,12 +77,44 @@ class TestERP5BankingCheckbookVaultTransferMixin: ...@@ -78,12 +77,44 @@ class TestERP5BankingCheckbookVaultTransferMixin:
self.workflow_tool.doActionFor(self.checkbook_reception, 'deliver_action', self.workflow_tool.doActionFor(self.checkbook_reception, 'deliver_action',
wf_id='checkbook_reception_workflow') wf_id='checkbook_reception_workflow')
def checkItemsCreated(self, sequence=None, sequence_list=None, **kwd): def createCheckbookReceptionWithTravelerCheck(self, sequence=None,
sequence_list=None, **kwd):
"""
Create a checkbook Reception
We do not need to check it because it is already done in another unit test.
"""
self.checkbook_reception = self.checkbook_reception_module.newContent(
id='checkbook_reception', portal_type='Checkbook Reception',
source_value=None, destination_value=self.reception_destination_site,
start_date=(self.date-4))
# get the checkbook reception document
self.checkbook_reception = getattr(self.checkbook_reception_module, 'checkbook_reception')
# Add a line for check and checkbook
self.line_2 = self.checkbook_reception.newContent(quantity=1,
resource_value=self.traveler_check_model,
check_amount_value=self.traveler_check_model.variant_1,
reference_range_min=52,
reference_range_max=52,
)
self.workflow_tool.doActionFor(self.checkbook_reception, 'confirm_action',
wf_id='checkbook_reception_workflow')
self.workflow_tool.doActionFor(self.checkbook_reception, 'deliver_action',
wf_id='checkbook_reception_workflow')
def checkItemsCreatedWithTravelerCheck(self, sequence=None,
sequence_list=None, **kwd):
self.checkItemsCreated(sequence=sequence,
sequence_list=sequence_list,
traveler_check=1,**kwd)
def checkItemsCreated(self, sequence=None, sequence_list=None,
traveler_check=0,**kwd):
""" """
Create the checkbook Create the checkbook
""" """
self.checkbook_1 = None self.checkbook_1 = None
self.check_1 = None self.check_1 = None
self.traveler_check = None
for line in self.checkbook_reception.objectValues(): for line in self.checkbook_reception.objectValues():
aggregate_value_list = line.getAggregateValueList() aggregate_value_list = line.getAggregateValueList()
...@@ -92,9 +123,15 @@ class TestERP5BankingCheckbookVaultTransferMixin: ...@@ -92,9 +123,15 @@ class TestERP5BankingCheckbookVaultTransferMixin:
if aggregate_value.getPortalType()=='Checkbook': if aggregate_value.getPortalType()=='Checkbook':
self.checkbook_1 = aggregate_value self.checkbook_1 = aggregate_value
elif aggregate_value.getPortalType()=='Check': elif aggregate_value.getPortalType()=='Check':
if aggregate_value.getResourceValue().isFixedPrice():
self.traveler_check = aggregate_value
else:
self.check_1 = aggregate_value self.check_1 = aggregate_value
if not traveler_check:
self.assertNotEquals(None,self.checkbook_1) self.assertNotEquals(None,self.checkbook_1)
self.assertNotEquals(None,self.check_1) self.assertNotEquals(None,self.check_1)
else:
self.assertNotEquals(traveler_check,None)
class TestERP5BankingCheckbookVaultTransfer(TestERP5BankingCheckbookVaultTransferMixin, class TestERP5BankingCheckbookVaultTransfer(TestERP5BankingCheckbookVaultTransferMixin,
TestERP5BankingMixin, ERP5TypeTestCase): TestERP5BankingMixin, ERP5TypeTestCase):
......
...@@ -238,7 +238,7 @@ class TestERP5BankingClassificationSurvey(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -238,7 +238,7 @@ class TestERP5BankingClassificationSurvey(TestERP5BankingMixin, ERP5TypeTestCase
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_incoming_line.getPrice(), 10000.0) self.assertEqual(self.valid_incoming_line.getPrice(), 10000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_incoming_line.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_incoming_line.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_incoming_line.objectValues()), 2) self.assertEqual(len(self.valid_incoming_line.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -278,7 +278,7 @@ class TestERP5BankingClassificationSurvey(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -278,7 +278,7 @@ class TestERP5BankingClassificationSurvey(TestERP5BankingMixin, ERP5TypeTestCase
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_incoming_line.getPrice(), 200.0) self.assertEqual(self.valid_incoming_line.getPrice(), 200.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_incoming_line.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_incoming_line.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_incoming_line.objectValues()), 2) self.assertEqual(len(self.valid_incoming_line.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -336,7 +336,7 @@ class TestERP5BankingClassificationSurvey(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -336,7 +336,7 @@ class TestERP5BankingClassificationSurvey(TestERP5BankingMixin, ERP5TypeTestCase
# check the value of coin # check the value of coin
self.assertEqual(self.valid_outgoing_line.getPrice(), 10000.0) self.assertEqual(self.valid_outgoing_line.getPrice(), 10000.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_outgoing_line.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_outgoing_line.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_outgoing_line.objectValues()), 2) self.assertEqual(len(self.valid_outgoing_line.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
...@@ -375,7 +375,7 @@ class TestERP5BankingClassificationSurvey(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -375,7 +375,7 @@ class TestERP5BankingClassificationSurvey(TestERP5BankingMixin, ERP5TypeTestCase
# check the value of coin # check the value of coin
self.assertEqual(self.valid_outgoing_line.getPrice(), 200.0) self.assertEqual(self.valid_outgoing_line.getPrice(), 200.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_outgoing_line.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_outgoing_line.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_outgoing_line.objectValues()), 2) self.assertEqual(len(self.valid_outgoing_line.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
......
...@@ -248,7 +248,7 @@ class TestERP5BankingCounterRendering(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -248,7 +248,7 @@ class TestERP5BankingCounterRendering(TestERP5BankingMixin, ERP5TypeTestCase):
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_line_1.getPrice(), 10000.0) self.assertEqual(self.valid_line_1.getPrice(), 10000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_line_1.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_1.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_1.objectValues()), 2) self.assertEqual(len(self.valid_line_1.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -306,7 +306,7 @@ class TestERP5BankingCounterRendering(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -306,7 +306,7 @@ class TestERP5BankingCounterRendering(TestERP5BankingMixin, ERP5TypeTestCase):
# check the value of coin # check the value of coin
self.assertEqual(self.valid_line_2.getPrice(), 200.0) self.assertEqual(self.valid_line_2.getPrice(), 200.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_line_2.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_2.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_2.objectValues()), 2) self.assertEqual(len(self.valid_line_2.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
......
...@@ -189,7 +189,7 @@ class TestERP5BankingForeignCashReception(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -189,7 +189,7 @@ class TestERP5BankingForeignCashReception(TestERP5BankingMixin, ERP5TypeTestCase
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_line_1.getPrice(), 50.0) self.assertEqual(self.valid_line_1.getPrice(), 50.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_line_1.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_1.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_1.objectValues()), 1) self.assertEqual(len(self.valid_line_1.objectValues()), 1)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -233,7 +233,7 @@ class TestERP5BankingForeignCashReception(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -233,7 +233,7 @@ class TestERP5BankingForeignCashReception(TestERP5BankingMixin, ERP5TypeTestCase
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_line_1.getPrice(), 20.0) self.assertEqual(self.valid_line_1.getPrice(), 20.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_line_1.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_1.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_1.objectValues()), 1) self.assertEqual(len(self.valid_line_1.objectValues()), 1)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -269,7 +269,7 @@ class TestERP5BankingForeignCashReception(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -269,7 +269,7 @@ class TestERP5BankingForeignCashReception(TestERP5BankingMixin, ERP5TypeTestCase
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_line_1.getPrice(), 50.0) self.assertEqual(self.valid_line_1.getPrice(), 50.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_line_1.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_1.getQuantityUnit(), 'unit')
# check we have one delivery cells # check we have one delivery cells
self.assertEqual(len(self.valid_line_1.objectValues()), 1) self.assertEqual(len(self.valid_line_1.objectValues()), 1)
# now check for variation # now check for variation
...@@ -299,7 +299,7 @@ class TestERP5BankingForeignCashReception(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -299,7 +299,7 @@ class TestERP5BankingForeignCashReception(TestERP5BankingMixin, ERP5TypeTestCase
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_line_1.getPrice(), 20.0) self.assertEqual(self.valid_line_1.getPrice(), 20.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_line_1.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_1.getQuantityUnit(), 'unit')
# check we have one delivery cells # check we have one delivery cells
self.assertEqual(len(self.valid_line_1.objectValues()), 1) self.assertEqual(len(self.valid_line_1.objectValues()), 1)
# now check for variation # now check for variation
......
...@@ -339,7 +339,7 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase) ...@@ -339,7 +339,7 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase)
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_line_1.getPrice(), 10000.0) self.assertEqual(self.valid_line_1.getPrice(), 10000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_line_1.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_1.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_1.objectValues()), 2) self.assertEqual(len(self.valid_line_1.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -385,7 +385,7 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase) ...@@ -385,7 +385,7 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase)
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_line_1.getPrice(), 10000.0) self.assertEqual(self.valid_line_1.getPrice(), 10000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_line_1.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_1.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_1.objectValues()), 2) self.assertEqual(len(self.valid_line_1.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -444,7 +444,7 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase) ...@@ -444,7 +444,7 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase)
# check the value of banknote # check the value of banknote
self.assertEqual(self.valid_line_2.getPrice(), 5000.0) self.assertEqual(self.valid_line_2.getPrice(), 5000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_line_2.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_2.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_2.objectValues()), 2) self.assertEqual(len(self.valid_line_2.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
...@@ -483,7 +483,7 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase) ...@@ -483,7 +483,7 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase)
# check the value of banknote # check the value of banknote
self.assertEqual(self.valid_line_2.getPrice(), 5000.0) self.assertEqual(self.valid_line_2.getPrice(), 5000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_line_2.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_2.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_2.objectValues()), 2) self.assertEqual(len(self.valid_line_2.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
......
...@@ -256,7 +256,7 @@ class TestERP5BankingMonetaryRecall(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -256,7 +256,7 @@ class TestERP5BankingMonetaryRecall(TestERP5BankingMixin, ERP5TypeTestCase):
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_line_1.getPrice(), 10000.0) self.assertEqual(self.valid_line_1.getPrice(), 10000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_line_1.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_1.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_1.objectValues()), 2) self.assertEqual(len(self.valid_line_1.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -314,7 +314,7 @@ class TestERP5BankingMonetaryRecall(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -314,7 +314,7 @@ class TestERP5BankingMonetaryRecall(TestERP5BankingMixin, ERP5TypeTestCase):
# check the value of coin # check the value of coin
self.assertEqual(self.valid_line_2.getPrice(), 200.0) self.assertEqual(self.valid_line_2.getPrice(), 200.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_line_2.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_2.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_2.objectValues()), 2) self.assertEqual(len(self.valid_line_2.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
......
...@@ -215,7 +215,7 @@ class TestERP5BankingMonetaryReception(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -215,7 +215,7 @@ class TestERP5BankingMonetaryReception(TestERP5BankingMixin, ERP5TypeTestCase):
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_line_1.getPrice(), 10000.0) self.assertEqual(self.valid_line_1.getPrice(), 10000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_line_1.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_1.getQuantityUnit(), 'unit')
# check we have one delivery cells # check we have one delivery cells
self.assertEqual(len(self.valid_line_1.objectValues()), 1) self.assertEqual(len(self.valid_line_1.objectValues()), 1)
# now check for variation 2003 # now check for variation 2003
......
...@@ -234,7 +234,7 @@ class TestERP5BankingMonetarySurvey(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -234,7 +234,7 @@ class TestERP5BankingMonetarySurvey(TestERP5BankingMixin, ERP5TypeTestCase):
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_line_1.getPrice(), 10000.0) self.assertEqual(self.valid_line_1.getPrice(), 10000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_line_1.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_1.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_1.objectValues()), 2) self.assertEqual(len(self.valid_line_1.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -292,7 +292,7 @@ class TestERP5BankingMonetarySurvey(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -292,7 +292,7 @@ class TestERP5BankingMonetarySurvey(TestERP5BankingMixin, ERP5TypeTestCase):
# check the value of coin # check the value of coin
self.assertEqual(self.valid_line_2.getPrice(), 200.0) self.assertEqual(self.valid_line_2.getPrice(), 200.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_line_2.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_2.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_2.objectValues()), 2) self.assertEqual(len(self.valid_line_2.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
......
...@@ -257,7 +257,7 @@ class TestERP5BankingMoneyDepositRendering(TestERP5BankingMixin, ERP5TypeTestCas ...@@ -257,7 +257,7 @@ class TestERP5BankingMoneyDepositRendering(TestERP5BankingMixin, ERP5TypeTestCas
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_line_1.getPrice(), 10000.0) self.assertEqual(self.valid_line_1.getPrice(), 10000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_line_1.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_1.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_1.objectValues()), 2) self.assertEqual(len(self.valid_line_1.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -315,7 +315,7 @@ class TestERP5BankingMoneyDepositRendering(TestERP5BankingMixin, ERP5TypeTestCas ...@@ -315,7 +315,7 @@ class TestERP5BankingMoneyDepositRendering(TestERP5BankingMixin, ERP5TypeTestCas
# check the value of coin # check the value of coin
self.assertEqual(self.valid_line_2.getPrice(), 200.0) self.assertEqual(self.valid_line_2.getPrice(), 200.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_line_2.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_2.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_2.objectValues()), 2) self.assertEqual(len(self.valid_line_2.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
......
...@@ -243,7 +243,7 @@ class TestERP5BankingMoneyDepositTransfer(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -243,7 +243,7 @@ class TestERP5BankingMoneyDepositTransfer(TestERP5BankingMixin, ERP5TypeTestCase
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_line_1.getPrice(), 10000.0) self.assertEqual(self.valid_line_1.getPrice(), 10000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_line_1.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_1.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_1.objectValues()), 2) self.assertEqual(len(self.valid_line_1.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -301,7 +301,7 @@ class TestERP5BankingMoneyDepositTransfer(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -301,7 +301,7 @@ class TestERP5BankingMoneyDepositTransfer(TestERP5BankingMixin, ERP5TypeTestCase
# check the value of coin # check the value of coin
self.assertEqual(self.valid_line_2.getPrice(), 200.0) self.assertEqual(self.valid_line_2.getPrice(), 200.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_line_2.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_2.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_2.objectValues()), 2) self.assertEqual(len(self.valid_line_2.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
......
...@@ -213,7 +213,7 @@ class TestERP5BankingUsualCashIncident(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -213,7 +213,7 @@ class TestERP5BankingUsualCashIncident(TestERP5BankingMixin, ERP5TypeTestCase):
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_line_1.getPrice(), 10000.0) self.assertEqual(self.valid_line_1.getPrice(), 10000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_line_1.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_1.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_1.objectValues()), 2) self.assertEqual(len(self.valid_line_1.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -271,7 +271,7 @@ class TestERP5BankingUsualCashIncident(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -271,7 +271,7 @@ class TestERP5BankingUsualCashIncident(TestERP5BankingMixin, ERP5TypeTestCase):
# check the value of coin # check the value of coin
self.assertEqual(self.valid_line_2.getPrice(), 200.0) self.assertEqual(self.valid_line_2.getPrice(), 200.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_line_2.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_2.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_2.objectValues()), 2) self.assertEqual(len(self.valid_line_2.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
......
...@@ -265,7 +265,7 @@ class TestERP5BankingUsualCashRendering(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -265,7 +265,7 @@ class TestERP5BankingUsualCashRendering(TestERP5BankingMixin, ERP5TypeTestCase):
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_line_1.getPrice(), 10000.0) self.assertEqual(self.valid_line_1.getPrice(), 10000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_line_1.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_1.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_1.objectValues()), 2) self.assertEqual(len(self.valid_line_1.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -327,7 +327,7 @@ class TestERP5BankingUsualCashRendering(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -327,7 +327,7 @@ class TestERP5BankingUsualCashRendering(TestERP5BankingMixin, ERP5TypeTestCase):
# check the value of coin # check the value of coin
self.assertEqual(self.valid_line_2.getPrice(), 200.0) self.assertEqual(self.valid_line_2.getPrice(), 200.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_line_2.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_2.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_2.objectValues()), 2) self.assertEqual(len(self.valid_line_2.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
......
...@@ -246,7 +246,7 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -246,7 +246,7 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase):
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_line_1.getPrice(), 10000.0) self.assertEqual(self.valid_line_1.getPrice(), 10000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_line_1.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_1.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_1.objectValues()), 2) self.assertEqual(len(self.valid_line_1.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -304,7 +304,7 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -304,7 +304,7 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase):
# check the value of coin # check the value of coin
self.assertEqual(self.valid_line_2.getPrice(), 200.0) self.assertEqual(self.valid_line_2.getPrice(), 200.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_line_2.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_2.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_2.objectValues()), 2) self.assertEqual(len(self.valid_line_2.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
......
...@@ -315,7 +315,7 @@ class TestERP5BankingVaultTransfer(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -315,7 +315,7 @@ class TestERP5BankingVaultTransfer(TestERP5BankingMixin, ERP5TypeTestCase):
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_line_1.getPrice(), 10000.0) self.assertEqual(self.valid_line_1.getPrice(), 10000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_line_1.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_1.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_1.objectValues()), 2) self.assertEqual(len(self.valid_line_1.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -363,7 +363,7 @@ class TestERP5BankingVaultTransfer(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -363,7 +363,7 @@ class TestERP5BankingVaultTransfer(TestERP5BankingMixin, ERP5TypeTestCase):
# chek the value of the banknote # chek the value of the banknote
self.assertEqual(self.valid_line_1.getPrice(), 10000.0) self.assertEqual(self.valid_line_1.getPrice(), 10000.0)
# check the unit of banknote # check the unit of banknote
self.assertEqual(self.valid_line_1.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_1.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_1.objectValues()), 2) self.assertEqual(len(self.valid_line_1.objectValues()), 2)
# now check for each variation (years 1992 and 2003) # now check for each variation (years 1992 and 2003)
...@@ -420,7 +420,7 @@ class TestERP5BankingVaultTransfer(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -420,7 +420,7 @@ class TestERP5BankingVaultTransfer(TestERP5BankingMixin, ERP5TypeTestCase):
# check the value of coin # check the value of coin
self.assertEqual(self.valid_line_2.getPrice(), 200.0) self.assertEqual(self.valid_line_2.getPrice(), 200.0)
# check the unit of coin # check the unit of coin
self.assertEqual(self.valid_line_2.getQuantityUnit(), 'quantity_unit/unit') self.assertEqual(self.valid_line_2.getQuantityUnit(), 'unit')
# check we have two delivery cells: (one for year 1992 and one for 2003) # check we have two delivery cells: (one for year 1992 and one for 2003)
self.assertEqual(len(self.valid_line_2.objectValues()), 2) self.assertEqual(len(self.valid_line_2.objectValues()), 2)
for variation in self.variation_list: for variation in self.variation_list:
......
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