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

Method test_empty_content_length

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

Source from the content-addressed store, hash-verified

133
134 @pytest.mark.parametrize("method", ("POST", "PUT", "PATCH", "OPTIONS"))
135 def test_empty_content_length(self, httpbin, method):
136 req = requests.Request(method, httpbin(method.lower()), data="").prepare()
137 assert req.headers["Content-Length"] == "0"
138
139 def test_override_content_length(self, httpbin):
140 headers = {"Content-Length": "not zero"}

Callers

nothing calls this directly

Calls 2

httpbinFunction · 0.85
prepareMethod · 0.45

Tested by

no test coverage detected