From 1d2d4aaefb9380709aa5650bc09dc29ea7d348cb Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 11 Apr 2018 19:09:44 -0700 Subject: crude crossref import test --- tests/test_backend.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/test_backend.py') 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) + -- cgit v1.2.3