summaryrefslogtreecommitdiffstats
path: root/python/tests/importer.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/tests/importer.py')
-rw-r--r--python/tests/importer.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/python/tests/importer.py b/python/tests/importer.py
new file mode 100644
index 00000000..190acbed
--- /dev/null
+++ b/python/tests/importer.py
@@ -0,0 +1,15 @@
+
+
+import pytest
+from fatcat.importer_common import FatcatImporter
+
+
+def test_issnl_mapping_lookup():
+ with open('tests/files/ISSN-to-ISSN-L.snip.txt', 'r') as issn_file:
+ fi = FatcatImporter("http://localhost:9411/v0", issn_file)
+
+ assert fi.issn2issnl('0000-0027') == '0002-0027'
+ assert fi.issn2issnl('0002-0027') == '0002-0027'
+ assert fi.issn2issnl('9999-0027') == None
+
+ assert fi.lookup_issnl('9999-9999') == None