aboutsummaryrefslogtreecommitdiffstats
path: root/python/tests/orcid.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-06-09 00:28:51 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-06-09 00:28:51 -0700
commitce0c06ca8e694362a3bf4cde175efbe1af6e4962 (patch)
tree94347a1c9d1900bffd79092bc94eb12a6ae6ea31 /python/tests/orcid.py
parent1960f398fb3ae664bec0efaaa6a399a7d01675cb (diff)
downloadfatcat-ce0c06ca8e694362a3bf4cde175efbe1af6e4962.tar.gz
fatcat-ce0c06ca8e694362a3bf4cde175efbe1af6e4962.zip
basic ORCID importer
Diffstat (limited to 'python/tests/orcid.py')
-rw-r--r--python/tests/orcid.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/python/tests/orcid.py b/python/tests/orcid.py
new file mode 100644
index 00000000..86a23603
--- /dev/null
+++ b/python/tests/orcid.py
@@ -0,0 +1,15 @@
+
+import pytest
+from fatcat.orcid_importer import FatcatOrcidImporter
+
+@pytest.fixture(scope="function")
+def orcid_importer():
+ yield FatcatOrcidImporter("http://localhost:9411/v0")
+
+def test_orcid_importer_batch(orcid_importer):
+ with open('tests/files/0000-0001-8254-7103.json', 'r') as f:
+ orcid_importer.process_batch(f)
+
+def test_orcid_importer(orcid_importer):
+ with open('tests/files/0000-0001-8254-7103.json', 'r') as f:
+ orcid_importer.process_source(f)