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'
示例#4
0
def test_gettext_params():
    s = i18n.gettext('Holidays', year=2010)
    assert isinstance(s, str) and (s == 'Vacances 2010')
示例#5
0
def test_gettext_unknown():
    i18n.set_locale(i18n.Locale('fr', 'FR'))
    s = i18n.gettext('unknown')
    assert isinstance(s, str) and (s == 'unknown')
示例#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')
示例#7
0
def test_gettext():
    s = i18n.gettext('hello')
    assert isinstance(s, str) and (s == 'bonjour')
示例#8
0
 def test_gettext_params(self):
     s = i18n.gettext('Holidays', year=2010)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'Vacances 2010')
示例#9
0
 def test_gettext(self):
     s = i18n.gettext('hello')
     self.assertTrue(isinstance(s, str))
     self.assertEqual(s, 'bonjour')
示例#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')
示例#11
0
 def test_gettext_params(self):
     s = i18n.gettext('Holidays', year=2010)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'Vacances 2010')
示例#12
0
 def test_gettext(self):
     s = i18n.gettext('hello')
     self.assertTrue(isinstance(s, str))
     self.assertEqual(s, 'bonjour')