mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-11 18:06:10 +00:00
Fix test_use_proxy cassette response type
This commit is contained in:
@@ -51,10 +51,10 @@ def proxy_server():
|
|||||||
def test_use_proxy(tmpdir, httpbin, proxy_server):
|
def test_use_proxy(tmpdir, httpbin, proxy_server):
|
||||||
'''Ensure that it works with a proxy.'''
|
'''Ensure that it works with a proxy.'''
|
||||||
with vcr.use_cassette(str(tmpdir.join('proxy.yaml'))):
|
with vcr.use_cassette(str(tmpdir.join('proxy.yaml'))):
|
||||||
response, _ = requests.get(httpbin.url, proxies={'http': proxy_server})
|
response = requests.get(httpbin.url, proxies={'http': proxy_server})
|
||||||
|
|
||||||
with vcr.use_cassette(str(tmpdir.join('proxy.yaml'))) as cassette:
|
with vcr.use_cassette(str(tmpdir.join('proxy.yaml'))) as cassette:
|
||||||
cassette_response, _ = requests.get(httpbin.url, proxies={'http': proxy_server})
|
cassette_response = requests.get(httpbin.url, proxies={'http': proxy_server})
|
||||||
|
|
||||||
assert cassette_response.headers == response.headers
|
assert cassette_response.headers == response.headers
|
||||||
assert cassette.play_count == 1
|
assert cassette.play_count == 1
|
||||||
|
|||||||
Reference in New Issue
Block a user