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

Method test_certificate_failure

tests/test_requests.py:1059–1066  ·  view source on GitHub ↗

When underlying SSL problems occur, an SSLError is raised.

(self, httpbin_secure)

Source from the content-addressed store, hash-verified

1057 assert warnings_category == warnings_expected
1058
1059 def test_certificate_failure(self, httpbin_secure):
1060 """
1061 When underlying SSL problems occur, an SSLError is raised.
1062 """
1063 with pytest.raises(RequestsSSLError):
1064 # Our local httpbin does not have a trusted CA, so this call will
1065 # fail if we use our default trust bundle.
1066 requests.get(httpbin_secure("status", "200"))
1067
1068 def test_urlencoded_get_query_multivalued_param(self, httpbin):
1069 r = requests.get(httpbin("get"), params={"test": ["foo", "baz"]})

Callers

nothing calls this directly

Calls 2

httpbin_secureFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected