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

Method test_override_content_length

tests/test_requests.py:139–143  ·  view source on GitHub ↗
(self, httpbin)

Source from the content-addressed store, hash-verified

137 assert req.headers["Content-Length"] == "0"
138
139 def test_override_content_length(self, httpbin):
140 headers = {"Content-Length": "not zero"}
141 r = requests.Request("POST", httpbin("post"), headers=headers).prepare()
142 assert "Content-Length" in r.headers
143 assert r.headers["Content-Length"] == "not zero"
144
145 def test_path_is_not_double_encoded(self):
146 request = requests.Request("GET", "http://0.0.0.0/get/test case").prepare()

Callers

nothing calls this directly

Calls 2

httpbinFunction · 0.85
prepareMethod · 0.45

Tested by

no test coverage detected