From 818a891a5e306e84e8165dec28cc4a5961180e8c Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 21 May 2019 17:20:17 -0700 Subject: more JALC importer polish --- python/tests/import_jalc.py | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'python/tests') diff --git a/python/tests/import_jalc.py b/python/tests/import_jalc.py index e92c26c0..693e77f4 100644 --- a/python/tests/import_jalc.py +++ b/python/tests/import_jalc.py @@ -1,7 +1,7 @@ import json, gzip import pytest -from fatcat_tools.importers import JalcImporter, Bs4XmlFilePusher +from fatcat_tools.importers import JalcImporter, Bs4XmlFilePusher, Bs4XmlLinesPusher from fixtures import api from bs4 import BeautifulSoup @@ -43,6 +43,33 @@ def test_jalc_importer(jalc_importer): assert counts['skip'] == 0 assert last_index == jalc_importer.api.get_changelog(limit=1)[0].index +def test_jalc_importer_lines(jalc_importer): + last_index = jalc_importer.api.get_changelog(limit=1)[0].index + with open('tests/files/jalc_rdf_sample_100.xml', 'r') as f: + jalc_importer.bezerk_mode = True + counts = Bs4XmlLinesPusher(jalc_importer, f, "