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'])
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)
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)