aboutsummaryrefslogtreecommitdiffstats
path: root/python/tests
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-01-09 15:37:42 -0800
committerBryan Newbold <bnewbold@archive.org>2020-01-09 16:33:21 -0800
commit38e635105a658850399847aa23a5bd5325b0d616 (patch)
tree3a887091df76b6128bb120e24942b27cf14e837d /python/tests
parent101e3c818fa5852c11003e616526726e189ab2c3 (diff)
downloadsandcrawler-38e635105a658850399847aa23a5bd5325b0d616.tar.gz
sandcrawler-38e635105a658850399847aa23a5bd5325b0d616.zip
lots of progress on wayback refactoring
- too much to list - canonical flags to control crawling - cdx_to_dict helper
Diffstat (limited to 'python/tests')
-rw-r--r--python/tests/test_savepagenow.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/python/tests/test_savepagenow.py b/python/tests/test_savepagenow.py
index 8681575..63dd887 100644
--- a/python/tests/test_savepagenow.py
+++ b/python/tests/test_savepagenow.py
@@ -182,10 +182,16 @@ def test_crawl_resource(spn_client, wayback_client):
'http://dummy-cdx/cdx',
status=200,
body=json.dumps(CDX_SPN_HIT))
+ responses.add(responses.GET,
+ 'https://web.archive.org/web/{}id_/{}'.format("20180326070330", TARGET + "/redirect"),
+ status=200,
+ headers={"X-Archive-Src": "liveweb-whatever.warc.gz"},
+ body=WARC_BODY)
+ print('https://web.archive.org/web/{}id_/{}'.format("20180326070330", TARGET + "/redirect"))
resp = spn_client.crawl_resource(TARGET, wayback_client)
- assert len(responses.calls) == 4
+ assert len(responses.calls) == 5
assert resp.hit == True
assert resp.status == "success"