aboutsummaryrefslogtreecommitdiffstats
path: root/python/tests
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2018-08-25 22:23:52 -0700
committerBryan Newbold <bnewbold@archive.org>2018-08-25 22:24:06 -0700
commitec67bbe00efe04f120bb9c278da61545af436a4c (patch)
treea28dd7cb738e72b0556d72dc5f57588c972aba94 /python/tests
parenta71d556763b4031bfa0e56abc72348d7f1d3d966 (diff)
downloadsandcrawler-ec67bbe00efe04f120bb9c278da61545af436a4c.tar.gz
sandcrawler-ec67bbe00efe04f120bb9c278da61545af436a4c.zip
WIP: ungrobided doesn't inherit (copypasta)
Diffstat (limited to 'python/tests')
-rw-r--r--python/tests/test_extraction_ungrobided.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/tests/test_extraction_ungrobided.py b/python/tests/test_extraction_ungrobided.py
index 0ec47bc..366d392 100644
--- a/python/tests/test_extraction_ungrobided.py
+++ b/python/tests/test_extraction_ungrobided.py
@@ -139,28 +139,28 @@ def test_parse_ungrobided_invalid(job):
print("space-prefixed line")
raw = " com,sagepub,cep)/content/28/9/960.full.pdf 20170705062200 http://cep.sagepub.com/content/28/9/960.full.pdf application/pdf 200 3I42H3S6NNFQ2MSVX7XZKYAYSCX5QBYJ - - 401 313356621 CITESEERX-CRAWL-2017-06-20-20170705061647307-00039-00048-wbgrp-svc284/CITESEERX-CRAWL-2017-06-20-20170705062052659-00043-31209~wbgrp-svc284.us.archive.org~8443.warc.gz"
- info, status = job.parse_line(raw)
+ info, status = job.parse_ungrobided_line(raw)
assert info is None
assert status['status'] == "invalid"
assert 'prefix' in status['reason']
print("commented line")
raw = "#com,sagepub,cep)/content/28/9/960.full.pdf 20170705062200 http://cep.sagepub.com/content/28/9/960.full.pdf application/pdf 200 3I42H3S6NNFQ2MSVX7XZKYAYSCX5QBYJ - - 401 313356621 CITESEERX-CRAWL-2017-06-20-20170705061647307-00039-00048-wbgrp-svc284/CITESEERX-CRAWL-2017-06-20-20170705062052659-00043-31209~wbgrp-svc284.us.archive.org~8443.warc.gz"
- info, status = job.parse_line(raw)
+ info, status = job.parse_ungrobided_line(raw)
assert info is None
assert status['status'] == "invalid"
assert 'prefix' in status['reason']
print("wrong column count")
raw = "a b c d e"
- info, status = job.parse_line(raw)
+ info, status = job.parse_ungrobided_line(raw)
assert info is None
assert status['status'] == "invalid"
assert 'parse' in status['reason']
print("CDX line, somehow")
raw = "com,sagepub,cep)/content/28/9/960.full.pdf 20170705062200 http://cep.sagepub.com/content/28/9/960.full.pdf - 200 3I42H3S6NNFQ2MSVX7XZKYAYSCX5QBYJ - - 401 313356621 CITESEERX-CRAWL-2017-06-20-20170705061647307-00039-00048-wbgrp-svc284/CITESEERX-CRAWL-2017-06-20-20170705062052659-00043-31209~wbgrp-svc284.us.archive.org~8443.warc.gz"
- info, status = job.parse_line(raw)
+ info, status = job.parse_ungrobided_line(raw)
assert info is None
print(status)
assert status['status'] == "invalid"