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)
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)
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)
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)