Example #1
0
 def test_format_money_without_trailing_zeroes(self):
     result = LOCALE_EN.format_money(Money(16, 'USD'),
                                     trailing_zeroes=False)
     assert result == '$16'
     result = LOCALE_EN.format_money(Money(5555, 'KRW'),
                                     trailing_zeroes=False)
     assert result == '₩5,555'
Example #2
0
 def test_format_money_defaults_to_trailing_zeroes(self):
     result = LOCALE_EN.format_money(Money(16, 'USD'))
     assert result == '$16.00'
     result = LOCALE_EN.format_money(Money(5555, 'KRW'))
     assert result == '₩5,555'
Example #3
0
 def test_format_currency_defaults_to_trailing_zeroes(self):
     expected = '$16.00'
     actual = LOCALE_EN.format_money(Money(16, 'USD'))
     assert actual == expected
Example #4
0
 def test_format_currency_without_trailing_zeroes(self):
     expected = '$16'
     actual = LOCALE_EN.format_money(Money(16, 'USD'), trailing_zeroes=False)
     assert actual == expected
Example #5
0
 def test_format_currency_defaults_to_trailing_zeroes(self):
     expected = '$16.00'
     actual = LOCALE_EN.format_money(Money(16, 'USD'))
     assert actual == expected
Example #6
0
 def test_format_currency_without_trailing_zeroes(self):
     expected = '$16'
     actual = LOCALE_EN.format_money(Money(16, 'USD'), trailing_zeroes=False)
     assert actual == expected