def test_gettext_unknown():
    s = i18n.gettext('unknown')
    assert isinstance(s, str)
    assert s == 'unknown'
def test_gettext():
    s = i18n.gettext('hello')
    assert isinstance(s, str)
    assert s == 'bonjour'
def test_gettext_params():
    s = i18n.gettext('Holidays', year=2010)
    assert isinstance(s, str)
    assert s == 'Vacances 2010'
Ejemplo n.º 4
0
def test_gettext_params():
    s = i18n.gettext('Holidays', year=2010)
    assert isinstance(s, str) and (s == 'Vacances 2010')
Ejemplo n.º 5
0
def test_gettext_unknown():
    i18n.set_locale(i18n.Locale('fr', 'FR'))
    s = i18n.gettext('unknown')
    assert isinstance(s, str) and (s == 'unknown')
Ejemplo n.º 6
0
 def test_gettext_unknown(self):
     i18n.set_locale(i18n.Locale('fr', 'FR'))
     s = i18n.gettext('unknown')
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'unknown')
Ejemplo n.º 7
0
def test_gettext():
    s = i18n.gettext('hello')
    assert isinstance(s, str) and (s == 'bonjour')
Ejemplo n.º 8
0
 def test_gettext_params(self):
     s = i18n.gettext('Holidays', year=2010)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'Vacances 2010')
Ejemplo n.º 9
0
 def test_gettext(self):
     s = i18n.gettext('hello')
     self.assertTrue(isinstance(s, str))
     self.assertEqual(s, 'bonjour')
Ejemplo n.º 10
0
 def test_gettext_unknown(self):
     i18n.set_locale(i18n.Locale('fr', 'FR'))
     s = i18n.gettext('unknown')
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'unknown')
Ejemplo n.º 11
0
 def test_gettext_params(self):
     s = i18n.gettext('Holidays', year=2010)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'Vacances 2010')
Ejemplo n.º 12
0
 def test_gettext(self):
     s = i18n.gettext('hello')
     self.assertTrue(isinstance(s, str))
     self.assertEqual(s, 'bonjour')