mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
aiohttp: Fix code linting
This commit is contained in:
committed by
Kevin McCarthy
parent
9817a8bda5
commit
5242e68cd1
@@ -324,19 +324,19 @@ def test_double_requests(tmpdir):
|
||||
|
||||
def test_cookies(scheme, tmpdir):
|
||||
url = scheme + (
|
||||
'://httpbin.org/response-headers?'
|
||||
'set-cookie=' + urllib.parse.quote('cookie_1=val_1; Path=/') + '&'
|
||||
'Set-Cookie=' + urllib.parse.quote('Cookie_2=Val_2; Path=/')
|
||||
"://httpbin.org/response-headers?"
|
||||
"set-cookie=" + urllib.parse.quote("cookie_1=val_1; Path=/") + "&"
|
||||
"Set-Cookie=" + urllib.parse.quote("Cookie_2=Val_2; Path=/")
|
||||
)
|
||||
with vcr.use_cassette(str(tmpdir.join("cookies.yaml"))) as cassette:
|
||||
response, _ = get(url, output='json')
|
||||
response, _ = get(url, output="json")
|
||||
|
||||
assert response.cookies.get('cookie_1').value == 'val_1'
|
||||
assert response.cookies.get('Cookie_2').value == 'Val_2'
|
||||
assert response.cookies.get("cookie_1").value == "val_1"
|
||||
assert response.cookies.get("Cookie_2").value == "Val_2"
|
||||
|
||||
with vcr.use_cassette(str(tmpdir.join("cookies.yaml"))) as cassette:
|
||||
response, _ = get(url, output='json')
|
||||
response, _ = get(url, output="json")
|
||||
assert cassette.play_count == 1
|
||||
|
||||
assert response.cookies.get('cookie_1').value == 'val_1'
|
||||
assert response.cookies.get('Cookie_2').value == 'Val_2'
|
||||
assert response.cookies.get("cookie_1").value == "val_1"
|
||||
assert response.cookies.get("Cookie_2").value == "Val_2"
|
||||
|
||||
Reference in New Issue
Block a user