def test_using_currency_without_precision_int(self): amount = 2500 expected = 2500 # Yen has no fractional amounts m = Money(amount, 'JPY') assert m.get_amount() == expected
def test_using_currency_without_precision_float(self): amount = 2500.0 expected = 2500 m = Money(amount, 'JPY') assert m.get_amount() == expected
def test_passing_int_uses_exact(self): initial = 2500 expected = 2500 m = Money(initial, 'USD') assert m.get_amount() == expected
def test_passing_float_stores_as_int(self): initial = 25.0 expected = 2500 m = Money(initial, 'USD') assert m.get_amount() == expected