示例#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']