MCPcopy
hub / github.com/psf/requests / test_no_body_content_length

Method test_no_body_content_length

tests/test_requests.py:130–132  ·  view source on GitHub ↗
(self, httpbin, method)

Source from the content-addressed store, hash-verified

128
129 @pytest.mark.parametrize("method", ("POST", "PUT", "PATCH", "OPTIONS"))
130 def test_no_body_content_length(self, httpbin, method):
131 req = requests.Request(method, httpbin(method.lower())).prepare()
132 assert req.headers["Content-Length"] == "0"
133
134 @pytest.mark.parametrize("method", ("POST", "PUT", "PATCH", "OPTIONS"))
135 def test_empty_content_length(self, httpbin, method):

Callers

nothing calls this directly

Calls 2

httpbinFunction · 0.85
prepareMethod · 0.45

Tested by

no test coverage detected