From c3e1f4f610537aa5777adae6b7b5af4d5c308e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com> Date: Mon, 1 Dec 2008 15:45:10 +0000 Subject: [PATCH] add possibility to defined a base price difference from exchanges price git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24757 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Banking/tests/TestERP5BankingMixin.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/product/ERP5Banking/tests/TestERP5BankingMixin.py b/product/ERP5Banking/tests/TestERP5BankingMixin.py index efd14b1fed..2acbe50e1e 100644 --- a/product/ERP5Banking/tests/TestERP5BankingMixin.py +++ b/product/ERP5Banking/tests/TestERP5BankingMixin.py @@ -311,18 +311,18 @@ class TestERP5BankingMixin: self.tic() - def createCurrency(self, currency_list=(('EUR', 'Euro', 1/650., 'USD'), ('USD', 'USD', 650., 'EUR')), only_currency=False): + def createCurrency(self, currency_list=(('EUR', 'Euro', 1/652., 1/650., 'USD'), ('USD', 'USD', 652, 650., 'EUR')), only_currency=False): # create the currency document for euro inside the currency module #currency_list = (('EUR', 'Euro', 1/650., 'USD'), ('USD', 'Dollar', 650., 'EUR')) # first create currency - for currency_id, title, base_price, price_currency in currency_list: + for currency_id, title, base_price, cell_price, price_currency in currency_list: currency = self.getCurrencyModule().newContent(id=currency_id, title=title, reference=currency_id) if only_currency: return # second, create exchange lines - for currency_id, title, base_price, price_currency in currency_list: + for currency_id, title, base_price, cell_price, price_currency in currency_list: currency = self.getCurrencyModule()[currency_id] exchange_line = None exchange_line = currency.newContent(portal_type='Currency Exchange Line', @@ -336,7 +336,7 @@ class TestERP5BankingMixin: cell_list = exchange_line.objectValues() self.assertEquals(len(cell_list),3) for cell in cell_list: - cell.setBasePrice(base_price) + cell.setBasePrice(cell_price) exchange_line.confirm() exchange_line.validate() -- 2.30.9