We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 90635a7 commit b0f02faCopy full SHA for b0f02fa
tests/unit/test_gitlab_http_methods.py
@@ -423,6 +423,22 @@ def test_get_request_invalid_data(gl):
423
assert responses.assert_call_count(url, 1) is True
424
425
426
+@responses.activate
427
+def test_head_request(gl):
428
+ url = "http://localhost/api/v4/projects"
429
+ responses.add(
430
+ method=responses.HEAD,
431
+ url=url,
432
+ headers={"X-Total": "1"},
433
+ status=200,
434
+ match=helpers.MATCH_EMPTY_QUERY_PARAMS,
435
+ )
436
+
437
+ result = gl.http_head("/projects")
438
+ assert isinstance(result, requests.structures.CaseInsensitiveDict)
439
+ assert result["X-Total"] == "1"
440
441
442
@responses.activate
443
def test_list_request(gl):
444
url = "http://localhost/api/v4/projects"
0 commit comments