File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,24 @@ def test_http_request(gl):
36
36
assert responses .assert_call_count (url , 1 ) is True
37
37
38
38
39
+ @responses .activate
40
+ def test_http_request_with_url_encoded_kwargs_does_not_duplicate_params (gl ):
41
+ url = "http://localhost/api/v4/projects?topics%5B%5D=python"
42
+ responses .add (
43
+ method = responses .GET ,
44
+ url = url ,
45
+ json = [{"name" : "project1" }],
46
+ status = 200 ,
47
+ match = [responses .matchers .query_param_matcher ({"topics[]" : "python" })],
48
+ )
49
+
50
+ kwargs = {"topics[]" : "python" }
51
+ http_r = gl .http_request ("get" , "/projects?topics%5B%5D=python" , ** kwargs )
52
+ http_r .json ()
53
+ assert http_r .status_code == 200
54
+ assert responses .assert_call_count (url , 1 )
55
+
56
+
39
57
@responses .activate
40
58
def test_http_request_404 (gl ):
41
59
url = "http://localhost/api/v4/not_there"
You can’t perform that action at this time.
0 commit comments