Example #1
0
 def test_empty(self):
     result = trans_str(self.context, {})
     self.assertEqual('', result)
Example #2
0
 def test_no_match(self):
     self.context['lang'] = 'ru'
     result = trans_str(self.context, self.trans_obj)
     self.assertEqual('English', result)
Example #3
0
 def test_match_es(self):
     self.context['lang'] = 'es'
     result = trans_str(self.context, self.trans_obj)
     self.assertEqual('EspaƱol', result)
Example #4
0
 def test_match_en(self):
     result = trans_str(self.context, self.trans_obj)
     self.assertEqual('English', result)
Example #5
0
 def test_canonical_html(self):
     result = trans_str(self.context, '<input>')
     self.assertEqual('<input>', result)
Example #6
0
 def test_canonical(self):
     result = trans_str(self.context, 'canonical string')
     self.assertEqual('canonical string', result)