aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_database.py
blob: 3d41e799c23893affd36199058a7ed9d80ad8d3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

from chocula.database import IssnDatabase


def test_issn_database():

    issn_db = IssnDatabase(issn_issnl_file_path="tests/files/ISSN-to-ISSN-L.txt")

    assert issn_db.issn2issnl('1234-5678') is None
    assert issn_db.issn2issnl('0000-0000') is None

    # "The Lancet"
    assert issn_db.issn2issnl('0140-6736') == '0140-6736'
    assert issn_db.issn2issnl('1474-547X') == '0140-6736'