def test_remove_multiple_arguments(self): hn = HumanName("Ms Hon Solo", constants=None) hn.C.titles.remove("hon", "ms") hn.parse_full_name() assert hn.first == "Ms" assert hn.middle == "Hon" assert hn.last == "Solo"
def test_add_multiple_arguments(self): hn = HumanName("Assoc Dean of Chemistry Robert Johns", constants=None) hn.C.titles.add("dean", "Chemistry") hn.parse_full_name() assert hn.title == "Assoc Dean of Chemistry" assert hn.first == "Robert" assert hn.last == "Johns"
def test_remove_title(self): hn = HumanName("Hon Solo", constants=None) start_len = len(hn.C.titles) assert start_len > 0 hn.C.titles.remove("hon") assert start_len - 1 == len(hn.C.titles) hn.parse_full_name() assert hn.first == "Hon" assert hn.last == "Solo"
def test_add_title(self): hn = HumanName("Te Awanui-a-Rangi Black", constants=None) start_len = len(hn.C.titles) assert start_len > 0 hn.C.titles.add("te") assert start_len + 1 == len(hn.C.titles) hn.parse_full_name() assert hn.title == "Te" assert hn.first == "Awanui-a-Rangi" assert hn.last == "Black"