mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-24 06:59:52 +01:00
tests: fix indexing test, remove extra space/print
This commit is contained in:
parent
d5c22e3649
commit
7f52ecdca9
@ -189,7 +189,6 @@ class LiveRewriter(object):
|
|||||||
if not url.startswith('file:'):
|
if not url.startswith('file:'):
|
||||||
url = os.path.abspath(url)
|
url = os.path.abspath(url)
|
||||||
url = urljoin('file:', pathname2url(url))
|
url = urljoin('file:', pathname2url(url))
|
||||||
print(url)
|
|
||||||
|
|
||||||
# explicit urlkey may be passed in (say for testing)
|
# explicit urlkey may be passed in (say for testing)
|
||||||
if not urlkey:
|
if not urlkey:
|
||||||
@ -200,7 +199,7 @@ class LiveRewriter(object):
|
|||||||
req_headers,
|
req_headers,
|
||||||
follow_redirects,
|
follow_redirects,
|
||||||
ignore_proxies)
|
ignore_proxies)
|
||||||
else:
|
else:
|
||||||
(status_headers, stream) = self.fetch_local_file(url)
|
(status_headers, stream) = self.fetch_local_file(url)
|
||||||
|
|
||||||
if timestamp is None:
|
if timestamp is None:
|
||||||
|
@ -172,7 +172,7 @@ def read_fully(cdx):
|
|||||||
def cdx_index(warc, **options):
|
def cdx_index(warc, **options):
|
||||||
buff = BytesIO()
|
buff = BytesIO()
|
||||||
|
|
||||||
with open(TEST_WARC_DIR + warc, 'rU') as fh:
|
with open(TEST_WARC_DIR + warc, 'rb') as fh:
|
||||||
write_cdx_index(buff, fh, warc, **options)
|
write_cdx_index(buff, fh, warc, **options)
|
||||||
|
|
||||||
return buff.getvalue()
|
return buff.getvalue()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user