def test_append_source(self): name = NameDefinition(name="name1", gender=Gender.boy, source=NameSource.ssa) name.append_attrs(source=NameSource.pantheon) assert len(name.sources) is 2 assert name.sources == {NameSource.ssa, NameSource.pantheon}
def test_gender_unisex_to_boy_still_unisex(self): name = NameDefinition(name="name1", gender=Gender.unisex) assert name.gender == Gender.unisex name.append_attrs(gender=Gender.boy) assert name.gender == Gender.unisex
def test_gender_girl_to_unisex(self): name = NameDefinition(name="name1", gender=Gender.girl) assert name.gender == Gender.girl name.append_attrs(gender=Gender.boy) assert name.gender == Gender.unisex