Commit 25934603 authored by Aurel's avatar Aurel

check the default computed exchange rate


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44627 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d49edfab
...@@ -216,6 +216,12 @@ class TestERP5BankingCashToCurrencyPurchase(TestERP5BankingMixin): ...@@ -216,6 +216,12 @@ class TestERP5BankingCashToCurrencyPurchase(TestERP5BankingMixin):
# check that its destination is guichet_1 # check that its destination is guichet_1
self.assertEqual(self.cash_to_currency_purchase.getDestination(), None) self.assertEqual(self.cash_to_currency_purchase.getDestination(), None)
self.setDocumentSourceReference(self.cash_to_currency_purchase) self.setDocumentSourceReference(self.cash_to_currency_purchase)
# check default exchange rate
rate = self.cash_to_currency_purchase.CurrencyExchange_getExchangeRateList(from_currency=self.cash_to_currency_purchase.getResource(),
to_currency='currency_module/%s' % (self.cash_to_currency_purchase.Baobab_getPortalReferenceCurrencyID()),
currency_exchange_type='purchase',
start_date=self.cash_to_currency_purchase.getStartDate())[0]
self.assertEqual(rate, 650.0)
# Check carrefully the script CurrencyPurchase_getQuantity # Check carrefully the script CurrencyPurchase_getQuantity
script = self.cash_to_currency_purchase.CurrencyPurchase_getQuantity script = self.cash_to_currency_purchase.CurrencyPurchase_getQuantity
self.assertEqual(script(), 65000) self.assertEqual(script(), 65000)
......
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