summaryrefslogtreecommitdiffstats
path: root/python/tests/import_issn.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-11-13 11:32:41 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-11-13 11:32:41 -0800
commit279b22e30d9b590838268f5f5acdaa1110ee593a (patch)
treec9965a089be1b8ef607573ea9261c0c378c0ab47 /python/tests/import_issn.py
parent7ebda2e051b51e49544ab75673b19ec5f27d9d45 (diff)
downloadfatcat-279b22e30d9b590838268f5f5acdaa1110ee593a.tar.gz
fatcat-279b22e30d9b590838268f5f5acdaa1110ee593a.zip
shuffle around fatcat_tools layout
Diffstat (limited to 'python/tests/import_issn.py')
-rw-r--r--python/tests/import_issn.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/python/tests/import_issn.py b/python/tests/import_issn.py
new file mode 100644
index 00000000..f45747ed
--- /dev/null
+++ b/python/tests/import_issn.py
@@ -0,0 +1,17 @@
+
+import pytest
+from fatcat_tools.importers.issn 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)