aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_backend.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-04-11 19:09:44 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-04-11 19:09:44 -0700
commit1d2d4aaefb9380709aa5650bc09dc29ea7d348cb (patch)
tree3f3a165a86f8ee566d9069977fa8d545bedcd708 /tests/test_backend.py
parentc3ae6357b4824450263d727dc5d23b5cf0e9305f (diff)
downloadfatcat-1d2d4aaefb9380709aa5650bc09dc29ea7d348cb.tar.gz
fatcat-1d2d4aaefb9380709aa5650bc09dc29ea7d348cb.zip
crude crossref import test
Diffstat (limited to 'tests/test_backend.py')
-rw-r--r--tests/test_backend.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_backend.py b/tests/test_backend.py
index 07a2a906..abf3cfff 100644
--- a/tests/test_backend.py
+++ b/tests/test_backend.py
@@ -58,3 +58,10 @@ class FatcatTestCase(unittest.TestCase):
def test_populate_complex(self):
fatcat.sql.populate_complex_db()
+
+ def test_load_crossref(self):
+ with open('./tests/files/crossref-works.2018-01-21.badsample.json', 'r') as f:
+ raw = [json.loads(l) for l in f.readlines() if len(l) > 3]
+ for obj in raw:
+ fatcat.sql.add_crossref(obj)
+