Пример #1
0
 def test_format_currency_with_trailing_zeroes(self):
     expected = '$16.00'
     actual = i18n.format_currency_with_options(16,
                                                'USD',
                                                locale='en',
                                                trailing_zeroes=True)
     assert actual == expected
Пример #2
0
 def test_format_currency_without_trailing_zeroes(self):
     expected = '$16'
     actual = i18n.format_currency_with_options(16,
                                                'USD',
                                                locale=i18n.Locale('en'),
                                                trailing_zeroes=False)
     assert actual == expected
Пример #3
0
 def test_format_currency_defaults_to_trailing_zeroes(self):
     expected = '$16.00'
     actual = i18n.format_currency_with_options(16, 'USD', locale='en')
     assert actual == expected
Пример #4
0
 def test_format_currency_without_trailing_zeroes(self):
     expected = '$16'
     actual = i18n.format_currency_with_options(16, 'USD', locale='en', trailing_zeroes=False)
     assert actual == expected
Пример #5
0
 def test_format_currency_defaults_to_trailing_zeroes(self):
     expected = '$16.00'
     actual = i18n.format_currency_with_options(16,
                                                'USD',
                                                locale=i18n.Locale('en'))
     assert actual == expected
Пример #6
0
 def test_format_currency_with_trailing_zeroes(self):
     expected = '$16.00'
     actual = i18n.format_currency_with_options(16, 'USD', locale=i18n.Locale('en'), trailing_zeroes=True)
     assert actual == expected