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
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
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
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
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
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
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