aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_database.py
blob: dc75d23f62eefba0b170105293020bcba96c3d59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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"