def test_gettext(self): self.assertEqual(i18n.gettext('foo'), u'foo')
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')
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')