Exemplo n.º 1
0
def test_dashed_name():
    creator = {
        "creatorName":
        "Hollyhock Manheim-Mannheim-Guerrero-Robinson-Zilberschlag-Hsung-Fonzerelli-McQuack"
    }
    name = creator_to_person(creator).name
    assert name.family == "Manheim-Mannheim-Guerrero-Robinson-Zilberschlag-Hsung-Fonzerelli-McQuack"
    assert name.given == "Hollyhock"
Exemplo n.º 2
0
def test_name_struct_overload():
    creator = {
        "familyName": "Smith",
        "givenName": "John",
        "creatorName": "Steve Holt"
    }
    name = creator_to_person(creator).name
    assert name.family == "Smith"
    assert name.given == "John"
Exemplo n.º 3
0
def test_creator_affiliations():
    creator = {"creatorName": "Kyle Michel", "affiliations": ["Berklee", "NW"]}
    name = creator_to_person(creator).tags == ["Berklee", "NW"]
Exemplo n.º 4
0
def test_simple_creator_name():
    creator = {"creatorName": "John Smith"}
    name = creator_to_person(creator).name
    assert name.family == "Smith"
    assert name.given == "John"
Exemplo n.º 5
0
def test_name_struct():
    creator = {"familyName": "Smith", "givenName": "John"}
    name = creator_to_person(creator).name
    assert name.family == "Smith"
    assert name.given == "John"
Exemplo n.º 6
0
def test_middle_creator_name():
    creator = {"creatorName": "Smith, John Jacob"}
    name = creator_to_person(creator).name
    assert name.family == "Smith"
    assert name.given == "John Jacob"
Exemplo n.º 7
0
def test_comma_creator_name():
    creator = {"creatorName": "Smith, John"}
    name = creator_to_person(creator).name
    assert name.family == "Smith"
    assert name.given == "John"