示例#1
0
 def test_gettext(self):
     self.assertEqual(i18n.gettext('foo'), u'foo')
示例#2
0
 def test_gettext_with_variables(self):
     self.assertEqual(i18n.gettext('foo %(foo)s'), u'foo %(foo)s')
     self.assertEqual(
         i18n.gettext('foo %(foo)s') % {'foo': 'bar'}, u'foo bar')
     self.assertEqual(i18n.gettext('foo %(foo)s', foo='bar'), u'foo bar')
示例#3
0
文件: test_i18n.py 项目: AmirS2/tipfy
 def test_gettext_with_variables(self):
     self.assertEqual(i18n.gettext('foo %(foo)s'), u'foo %(foo)s')
     self.assertEqual(i18n.gettext('foo %(foo)s') % {'foo': 'bar'}, u'foo bar')
     self.assertEqual(i18n.gettext('foo %(foo)s', foo='bar'), u'foo bar')
示例#4
0
 def test_gettext(self):
     self.assertEqual(i18n.gettext('foo'), u'foo')