def test_basics(): names = { "MCCRUFT": "McCruft", "MACCRUFT": "MacCruft", "SMITH": "Smith" } for name in names: got = normaize_last_name(name) print got, names[name] assert got == names[name]
def last_name(obj): lnames = load_data("last_names") name = get_random_choice(lnames)['name'] name = normaize_last_name(name) obj.last_name = name return obj