aboutsummaryrefslogtreecommitdiffstats
path: root/python/tests/issn.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-06-21 10:19:50 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-06-21 10:19:50 -0700
commitf7c04ce03335c24da4cfe44a1bcbc1f8ea14784c (patch)
tree4a40303efab7fd01109adcb3e6ac3440c9f1b4fe /python/tests/issn.py
parenta1d94e6c28b080158fd65d0ec54ff6d64451df97 (diff)
downloadfatcat-f7c04ce03335c24da4cfe44a1bcbc1f8ea14784c.tar.gz
fatcat-f7c04ce03335c24da4cfe44a1bcbc1f8ea14784c.zip
ISSN importer
Diffstat (limited to 'python/tests/issn.py')
-rw-r--r--python/tests/issn.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/python/tests/issn.py b/python/tests/issn.py
new file mode 100644
index 00000000..fff112f7
--- /dev/null
+++ b/python/tests/issn.py
@@ -0,0 +1,17 @@
+
+import pytest
+from fatcat.issn_importer import FatcatIssnImporter
+
+
+@pytest.fixture(scope="function")
+def issn_importer():
+ yield FatcatIssnImporter("http://localhost:9411/v0")
+
+# TODO: use API to check that entities actually created...
+def test_issn_importer_batch(issn_importer):
+ with open('tests/files/journal_extra_metadata.snip.csv', 'r') as f:
+ issn_importer.process_csv_batch(f)
+
+def test_issn_importer(issn_importer):
+ with open('tests/files/journal_extra_metadata.snip.csv', 'r') as f:
+ issn_importer.process_csv_source(f)