1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-08 16:53:23 +00:00

fix flaky test

This commit is contained in:
Kevin McCarthy
2016-07-16 08:58:07 -10:00
parent 3a46616ba6
commit d2368eb2c4

View File

@@ -67,8 +67,8 @@ def test_original_decoded_response_is_not_modified(tmpdir, httpbin):
assert 'gzip' == inside.headers['content-encoding']
# They should effectively be the same response.
inside_headers = (h for h in inside.headers.items() if h[0] != 'Date')
outside_headers = (h for h in outside.getheaders() if h[0] != 'Date')
inside_headers = (h for h in inside.headers.items() if h[0].lower() != 'date')
outside_headers = (h for h in outside.getheaders() if h[0].lower() != 'date')
assert set(inside_headers) == set(outside_headers)
inside = zlib.decompress(inside.read(), 16+zlib.MAX_WBITS)
outside = zlib.decompress(outside.read(), 16+zlib.MAX_WBITS)