Esempio n. 1
0
 def test_xx_YY_locale(self):
     """Falls back to English for unknown Django locales"""
     translation.activate('xx-YY')
     # Note: this activation does not make Django attempt to use xx-YY
     eq_('en-us', translation.get_language())
     num = _format_decimal(1234.567)
     eq_('1,234.567', num)
Esempio n. 2
0
 def test_xx_YY_locale(self):
     """Falls back to English for unknown Django locales"""
     translation.activate('xx-YY')
     # Note: this activation does not make Django attempt to use xx-YY
     eq_('en-us', translation.get_language())
     num = _format_decimal(1234.567)
     eq_('1,234.567', num)
Esempio n. 3
0
 def test_fy_NL_locale(self):
     """Falls back to English for unknown babel locales"""
     # Note: if this starts to fail for no apparent reason, it's probably
     # because babel learned about fy-NL since this test was written.
     translation.activate('fy-NL')
     eq_('fy-nl', translation.get_language())
     num = _format_decimal(1234.567)
     eq_('1,234.567', num)
Esempio n. 4
0
 def test_fy_NL_locale(self):
     """Falls back to English for unknown babel locales"""
     # Note: if this starts to fail for no apparent reason, it's probably
     # because babel learned about fy-NL since this test was written.
     translation.activate('fy-NL')
     eq_('fy-nl', translation.get_language())
     num = _format_decimal(1234.567)
     eq_('1,234.567', num)
Esempio n. 5
0
 def test_fr_locale(self):
     """French locale returns french format"""
     translation.activate('fr')
     num = _format_decimal(1234.567)
     eq_(u'1\xa0234,567', num)
Esempio n. 6
0
 def test_default_locale(self):
     """Default locale just works"""
     num = _format_decimal(1234.567)
     eq_('1,234.567', num)
Esempio n. 7
0
 def test_fr_locale(self):
     """French locale returns french format"""
     translation.activate('fr')
     num = _format_decimal(1234.567)
     eq_(u'1\xa0234,567', num)
Esempio n. 8
0
 def test_default_locale(self):
     """Default locale just works"""
     num = _format_decimal(1234.567)
     eq_('1,234.567', num)