예제 #1
0
 def test_string_parse_default_currency(self):
     value = Money.from_string('100.35')
     assert value.amount == Decimal('100.35')
     assert value.currency == settings.BASE_CURRENCY
     assert value.currency == CURRENCIES[settings.BASE_CURRENCY]
예제 #2
0
 def test_string_parse_default_currency(self):
     value = Money.from_string('100.35')
     assert value.amount == Decimal('100.35')
     assert value.currency == settings.BASE_CURRENCY
     assert value.currency == CURRENCIES[settings.BASE_CURRENCY]
예제 #3
0
 def test_string_parse(self):
     value = Money.from_string('100.0 GBP')
     assert value.amount == Decimal('100.0')
     assert value.currency == 'GBP'
     assert value.currency == CURRENCIES['GBP']
예제 #4
0
 def test_string_parse(self):
     value = Money.from_string('100.0 GBP')
     assert value.amount == Decimal('100.0')
     assert value.currency == 'GBP'
     assert value.currency == CURRENCIES['GBP']