Ejemplo n.º 1
0
 def test_forms(self):
     name = Name('ru', {'genders': {'m': {'ru': ['form_1', 'form_2']}}})
     self.assertEqual(name.get_forms_for(GENDER.MALE), ['form_1', 'form_2'])
Ejemplo n.º 2
0
 def test_forms(self):
     name = Name('ru', {'genders': {'m': {'ru': ['form_1', 'form_2']}}})
     self.assertEqual(name.get_forms_for(GENDER.MALE), ['form_1', 'form_2'])
Ejemplo n.º 3
0
 def test_base(self):
     name = Name('ru', {'genders': {'m': {'ru': 'ru_name'}}})
     self.assertEqual(str(name), 'ru_name')
     self.assertEqual(name.get_for(GENDER.MALE, LANGUAGE.RU), 'ru_name')
     self.assertEqual(name.get_for(GENDER.MALE), 'ru_name')
     self.assertEqual(name.get_forms_for(GENDER.MALE), None)
Ejemplo n.º 4
0
 def test_base(self):
     name = Name('ru', {'genders': {'m': {'ru': 'ru_name'}}})
     self.assertEqual(unicode(name), 'ru_name')
     self.assertEqual(name.get_for(GENDER.MALE, LANGUAGE.RU), 'ru_name')
     self.assertEqual(name.get_for(GENDER.MALE), 'ru_name')
     self.assertEqual(name.get_forms_for(GENDER.MALE), None)