mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 01:03:24 +00:00
Check if query params in the string URL are also included in the final params
This commit is contained in:
committed by
Jair Henrique
parent
eb96c590ff
commit
be1035fd5d
@@ -152,12 +152,13 @@ def test_post(tmpdir, scheme, body, caplog):
|
|||||||
|
|
||||||
|
|
||||||
def test_params(tmpdir, scheme):
|
def test_params(tmpdir, scheme):
|
||||||
url = scheme + "://httpbin.org/get"
|
url = scheme + "://httpbin.org/get?d=d"
|
||||||
headers = {"Content-Type": "application/json"}
|
headers = {"Content-Type": "application/json"}
|
||||||
params = {"a": 1, "b": 2, "c": "c"}
|
params = {"a": 1, "b": 2, "c": "c"}
|
||||||
|
|
||||||
with vcr.use_cassette(str(tmpdir.join("get.yaml"))) as cassette:
|
with vcr.use_cassette(str(tmpdir.join("get.yaml"))) as cassette:
|
||||||
_, response_json = get(url, output="json", params=params, headers=headers)
|
_, response_json = get(url, output="json", params=params, headers=headers)
|
||||||
|
assert response_json["args"] == {"a": "1", "b": "2", "c": "c", "d": "d"}
|
||||||
|
|
||||||
with vcr.use_cassette(str(tmpdir.join("get.yaml"))) as cassette:
|
with vcr.use_cassette(str(tmpdir.join("get.yaml"))) as cassette:
|
||||||
_, cassette_response_json = get(url, output="json", params=params, headers=headers)
|
_, cassette_response_json = get(url, output="json", params=params, headers=headers)
|
||||||
|
|||||||
Reference in New Issue
Block a user