1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-09 01:03:24 +00:00

Test aiohttp usage with query strings on the URL

This commit is contained in:
Luiz Menezes
2018-07-08 23:06:22 -03:00
parent dbddaa0e44
commit 306238d561
2 changed files with 18 additions and 2 deletions

View File

@@ -52,12 +52,11 @@ def vcr_request(cassette, real_request):
data = kwargs.get('data')
params = kwargs.get('params')
request_url = URL(url)
if params:
for k, v in params.items():
params[k] = str(v)
request_url = URL(url).with_query(params)
else:
request_url = URL(url)
vcr_request = Request(method, str(request_url), data, headers)