]> khamidou — GitHub mirrors - vcrpy.git/commitdiff
fix flaky test
authorKevin McCarthy <me@kevinmccarthy.org>
Sat, 16 Jul 2016 18:58:07 +0000 (08:58 -1000)
committerKevin McCarthy <me@kevinmccarthy.org>
Sat, 16 Jul 2016 18:58:07 +0000 (08:58 -1000)
tests/integration/test_stubs.py

index 71c7f3b989c52f82e994906e2f00934935077ec3..23bf8ecae887070d195df2c967dcc50a40d60f8a 100644 (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)