From 38e635105a658850399847aa23a5bd5325b0d616 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 9 Jan 2020 15:37:42 -0800 Subject: lots of progress on wayback refactoring - too much to list - canonical flags to control crawling - cdx_to_dict helper --- python/tests/test_savepagenow.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'python/tests') 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" -- cgit v1.2.3