source: main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/payments/tests/test_currencies.py @ 12276

Last change on this file since 12276 was 12248, checked in by uli, 10 years ago

General currency support (not limited to paypal).

File size: 586 bytes
Line 
1import unittest
2from waeup.ikoba.payments.currencies import (
3    get_decimal_units, ISO_4217_CURRENCIES,
4    )
5
6
7class CurrenciesTests(unittest.TestCase):
8
9    def test_get_decimal_units(self):
10        # we can get the number of decimals for a currency code
11        assert get_decimal_units('USD') == 2
12
13    def test_iso_currencies_no_linebreak(self):
14        # sanity check: make sure we didn't compile linebreaks
15        for key, value in ISO_4217_CURRENCIES.items():
16            assert '\n' not in key
17            assert '\n' not in value[0]
18            assert '\n' not in value[1]
Note: See TracBrowser for help on using the repository browser.