Example #1
0
 def test_format_number_hyphenated_locale(self, format_number):
     ctx = {'LANG': 'pt-BR'}
     locale = Locale('pt', 'BR')
     eq_(helpers.l10n_format_number(ctx, 10000),
         format_number.return_value)
     format_number.assert_called_with(
         10000, locale=locale)
Example #2
0
 def test_format_number(self, format_number):
     ctx = {'LANG': 'de'}
     locale = Locale('de')
     eq_(helpers.l10n_format_number(ctx, 10000),
         format_number.return_value)
     format_number.assert_called_with(
         10000, locale=locale)
Example #3
0
 def test_format_number_hyphenated_locale(self, format_number):
     ctx = {"LANG": "pt-BR"}
     locale = Locale("pt", "BR")
     eq_(helpers.l10n_format_number(ctx, 10000), format_number.return_value)
     format_number.assert_called_with(10000, locale=locale)
Example #4
0
 def test_format_number(self, format_number):
     ctx = {"LANG": "de"}
     locale = Locale("de")
     eq_(helpers.l10n_format_number(ctx, 10000), format_number.return_value)
     format_number.assert_called_with(10000, locale=locale)