We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parente2ea8b8 commit6f71c66Copy full SHA for 6f71c66
tests/unit/test_gitlab_http_methods.py
@@ -36,6 +36,24 @@ def test_http_request(gl):
36
assertresponses.assert_call_count(url,1)isTrue
37
38
39
+@responses.activate
40
+deftest_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
+asserthttp_r.status_code==200
54
+assertresponses.assert_call_count(url,1)
55
56
57
@responses.activate
58
deftest_http_request_404(gl):
59
url="http://localhost/api/v4/not_there"