Пример #1
0
 def test_get_all_origins_same_meaning(self):
     name = NameDefinition(name="name1",
                           gender=Gender.boy,
                           meaning="meaning1",
                           origin=Region.United_States)
     name.add_meaning("meaning1", origin=Region.United_Kingdom)
     expected_meanings = [Region.United_States, Region.United_Kingdom]
     expected_meanings.sort()
     assert name.get_all_origins() == expected_meanings
Пример #2
0
 def test_get_all_origins_different_meanings(self):
     name = NameDefinition(name="name1",
                           gender=Gender.boy,
                           meaning="meaning1",
                           origin=Region.United_States)
     name.add_meaning("meaning1", origin=Region.United_Kingdom)
     name.add_meaning("meaning2", origin=Region.India)
     name.add_meaning("meaning2", origin=Region.Tamil)
     expected_meanings = [
         Region.United_Kingdom, Region.United_States, Region.India,
         Region.Tamil
     ]
     expected_meanings.sort()
     assert name.get_all_origins() == expected_meanings