mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
fix tests in stubs, requests ssl verification and httpbin+flask
This commit is contained in:
@@ -66,7 +66,9 @@ def test_original_decoded_response_is_not_modified(tmpdir, httpbin):
|
|||||||
assert 'gzip' == inside.headers['content-encoding']
|
assert 'gzip' == inside.headers['content-encoding']
|
||||||
|
|
||||||
# They should effectively be the same response.
|
# They should effectively be the same response.
|
||||||
assert inside.headers.items() == outside.getheaders()
|
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')
|
||||||
|
assert set(inside_headers) == set(outside_headers)
|
||||||
assert inside.read() == outside.read()
|
assert inside.read() == outside.read()
|
||||||
|
|
||||||
# Even though the above are raw bytes, the JSON data should have been
|
# Even though the above are raw bytes, the JSON data should have been
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ def test_amazon_doctype(tmpdir):
|
|||||||
# amazon gzips its homepage. For some reason, in requests 2.7, it's not
|
# amazon gzips its homepage. For some reason, in requests 2.7, it's not
|
||||||
# getting gunzipped.
|
# getting gunzipped.
|
||||||
with vcr.use_cassette(str(tmpdir.join('amz.yml'))):
|
with vcr.use_cassette(str(tmpdir.join('amz.yml'))):
|
||||||
r = requests.get('http://www.amazon.com')
|
r = requests.get('http://www.amazon.com', verify=False)
|
||||||
assert 'html' in r.text
|
assert 'html' in r.text
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user