Ejemplo n.º 1
0
def test_get_inspire_url_without_recid_or_bai():
    without_recid_or_bai = InspireRecord({})

    expected = 'http://inspirehep.net/hepnames'
    result = get_inspire_url(without_recid_or_bai)

    assert expected == result
Ejemplo n.º 2
0
def test_get_inspire_url_with_bai():
    with_bai = InspireRecord({'bai': 'TODO'})

    expected = 'http://inspirehep.net/author/profile/TODO'
    result = get_inspire_url(with_bai)

    assert expected == result
Ejemplo n.º 3
0
def test_get_inspire_url_with_control_number():
    with_recid = InspireRecord({'control_number': 'TODO'})

    expected = 'http://inspirehep.net/record/TODO'
    result = get_inspire_url(with_recid)

    assert expected == result
Ejemplo n.º 4
0
def test_get_inspire_url_without_recid_or_bai():
    without_recid_or_bai = InspireRecord({})

    expected = 'http://inspirehep.net/hepnames'
    result = get_inspire_url(without_recid_or_bai)

    assert expected == result
Ejemplo n.º 5
0
def test_get_inspire_url_with_control_number():
    with_recid = InspireRecord({'control_number': 'TODO'})

    expected = 'http://inspirehep.net/record/TODO'
    result = get_inspire_url(with_recid)

    assert expected == result
Ejemplo n.º 6
0
def test_get_inspire_url_with_bai():
    with_bai = InspireRecord({'bai': 'TODO'})

    expected = 'http://inspirehep.net/author/profile/TODO'
    result = get_inspire_url(with_bai)

    assert expected == result
Ejemplo n.º 7
0
def test_get_inspire_url_with_recid():
    with_recid = Record({'recid': 'TODO'})

    expected = 'http://inspirehep.net/record/TODO'
    result = get_inspire_url(with_recid)

    assert expected == result