From b3529b5f503b5a7738731b65b78169c8f9d2126e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com> Date: Thu, 29 Mar 2007 08:20:00 +0000 Subject: [PATCH] create exchange line from euro to dollar and remove base price on it git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13781 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../ERP5Banking/tests/TestERP5BankingMixin.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/product/ERP5Banking/tests/TestERP5BankingMixin.py b/product/ERP5Banking/tests/TestERP5BankingMixin.py index 71d294bc20..b9a0b5820e 100644 --- a/product/ERP5Banking/tests/TestERP5BankingMixin.py +++ b/product/ERP5Banking/tests/TestERP5BankingMixin.py @@ -317,12 +317,27 @@ class TestERP5BankingMixin: currency_exchange_type_list=['currency_exchange_type/sale', 'currency_exchange_type/purchase', 'currency_exchange_type/transfer'], - base_price=2) + ) cell_list = exchange_line.objectValues() self.assertEquals(len(cell_list),3) for cell in cell_list: cell.setBasePrice(650.0) cell.setDiscount(650.0) + elif id == "EUR": + # Create an exchange line + exchange_line = currency.newContent(portal_type='Currency Exchange Line', + start_date='01/01/1900',stop_date='01/01/2900', + price_currency='currency_module/USD', + currency_exchange_type_list=['currency_exchange_type/sale', + 'currency_exchange_type/purchase', + 'currency_exchange_type/transfer'], + ) + cell_list = exchange_line.objectValues() + self.assertEquals(len(cell_list),3) + for cell in cell_list: + cell.setBasePrice(1./650.0) + cell.setDiscount(1./650.0) + return currency -- 2.30.9