summaryrefslogtreecommitdiffstats
path: root/python/tests/crossref.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-06-20 17:54:54 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-06-20 17:54:54 -0700
commit43e74c2e81c64d6d4f4e644cc5a6f75945ff660d (patch)
tree769cae1607f3b8b9fff43fce99028bda571c2145 /python/tests/crossref.py
parent381fe70c56b1a936d4eef676ee8ba546f6a3cf30 (diff)
downloadfatcat-43e74c2e81c64d6d4f4e644cc5a6f75945ff660d.tar.gz
fatcat-43e74c2e81c64d6d4f4e644cc5a6f75945ff660d.zip
more progress on crossref+orcid importers
Diffstat (limited to 'python/tests/crossref.py')
-rw-r--r--python/tests/crossref.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/python/tests/crossref.py b/python/tests/crossref.py
index e72f7d02..402195d7 100644
--- a/python/tests/crossref.py
+++ b/python/tests/crossref.py
@@ -5,7 +5,8 @@ from fatcat.crossref_importer import FatcatCrossrefImporter
@pytest.fixture(scope="function")
def crossref_importer():
- yield FatcatCrossrefImporter("http://localhost:9411/v0")
+ with open('tests/files/ISSN-to-ISSN-L.snip.txt', 'r') as issn_file:
+ yield FatcatCrossrefImporter("http://localhost:9411/v0", issn_file)
def test_crossref_importer_batch(crossref_importer):
with open('tests/files/crossref-works.2018-01-21.badsample.json', 'r') as f:
@@ -14,3 +15,8 @@ def test_crossref_importer_batch(crossref_importer):
def test_crossref_importer(crossref_importer):
with open('tests/files/crossref-works.2018-01-21.badsample.json', 'r') as f:
crossref_importer.process_source(f)
+
+def test_crossref_importer_create(crossref_importer):
+ crossref_importer.create_containers = True
+ with open('tests/files/crossref-works.2018-01-21.badsample.json', 'r') as f:
+ crossref_importer.process_source(f)