aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_database.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-05-07 19:56:51 -0700
committerBryan Newbold <bnewbold@archive.org>2020-05-07 19:56:51 -0700
commitcd03ba1cd1c3e05a16ef2ed326f9847f411ee53d (patch)
tree75b50eab800d08f3b54f24036dbe1eb797348fba /tests/test_database.py
parent485c35f22d5817e524d3252bc13694961c98521f (diff)
downloadchocula-cd03ba1cd1c3e05a16ef2ed326f9847f411ee53d.tar.gz
chocula-cd03ba1cd1c3e05a16ef2ed326f9847f411ee53d.zip
start of basic tests
Diffstat (limited to 'tests/test_database.py')
-rw-r--r--tests/test_database.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_database.py b/tests/test_database.py
new file mode 100644
index 0000000..3d41e79
--- /dev/null
+++ b/tests/test_database.py
@@ -0,0 +1,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'
+