mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
Strip empty lines from index_content for test
This commit is contained in:
parent
e71159c25b
commit
786205921c
@ -228,8 +228,6 @@ directory structure expected by pywb
|
||||
wacz_index = open(wacz_index_path, 'rb')
|
||||
|
||||
for line in wacz_index:
|
||||
if not line:
|
||||
continue
|
||||
cdx_object = CDXObject(cdxline=line)
|
||||
if cdx_object['filename'] in filename_mapping:
|
||||
cdx_object['filename'] = filename_mapping[cdx_object['filename']]
|
||||
|
@ -91,6 +91,7 @@ class TestManager:
|
||||
{'example-collection.warc': 'rewritten.warc'})
|
||||
with open(os.path.join(manager.indexes_dir, manager.DEF_INDEX_FILE), 'r') as f:
|
||||
index_content = f.read()
|
||||
index_content = index_content.strip()
|
||||
|
||||
assert 'example-collection.warc' not in index_content
|
||||
assert 'rewritten.warc' in index_content
|
||||
|
Loading…
x
Reference in New Issue
Block a user