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

Method test_mixed_case_scheme_acceptable

tests/test_requests.py:196–203  ·  view source on GitHub ↗
(self, httpbin, scheme)

Source from the content-addressed store, hash-verified

194
195 @pytest.mark.parametrize("scheme", ("http://", "HTTP://", "hTTp://", "HttP://"))
196 def test_mixed_case_scheme_acceptable(self, httpbin, scheme):
197 s = requests.Session()
198 s.proxies = getproxies()
199 parts = urlparse(httpbin("get"))
200 url = scheme + parts.netloc + parts.path
201 r = requests.Request("GET", url)
202 r = s.send(r.prepare())
203 assert r.status_code == 200, f"failed for scheme {scheme}"
204
205 def test_HTTP_200_OK_GET_ALTERNATIVE(self, httpbin):
206 r = requests.Request("GET", httpbin("get"))

Callers

nothing calls this directly

Calls 3

sendMethod · 0.95
prepareMethod · 0.95
httpbinFunction · 0.85

Tested by

no test coverage detected