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

Method test_request_with_bytestring_host

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

Source from the content-addressed store, hash-verified

1234 assert prep.url == "https://httpbin.org/"
1235
1236 def test_request_with_bytestring_host(self, httpbin):
1237 s = requests.Session()
1238 resp = s.request(
1239 "GET",
1240 httpbin("cookies/set?cookie=value"),
1241 allow_redirects=False,
1242 headers={"Host": b"httpbin.org"},
1243 )
1244 assert resp.cookies.get("cookie") == "value"
1245
1246 def test_links(self):
1247 r = requests.Response()

Callers

nothing calls this directly

Calls 3

requestMethod · 0.95
httpbinFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected