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]
Exemple #2
0
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