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

Method test_respect_proxy_env_on_request

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

Source from the content-addressed store, hash-verified

645 session.get(httpbin())
646
647 def test_respect_proxy_env_on_request(self, httpbin):
648 with override_environ(http_proxy=INVALID_PROXY):
649 with pytest.raises(ProxyError):
650 session = requests.Session()
651 session.request(method="GET", url=httpbin())
652
653 def test_proxy_authorization_preserved_on_request(self, httpbin):
654 proxy_auth_value = "Bearer XXX"

Callers

nothing calls this directly

Calls 3

requestMethod · 0.95
override_environFunction · 0.85
httpbinFunction · 0.85

Tested by

no test coverage detected