MCPcopy
hub / github.com/redis/redis-py / test_ssl_with_invalid_cert

Method test_ssl_with_invalid_cert

tests/test_ssl.py:33–39  ·  view source on GitHub ↗
(self, request)

Source from the content-addressed store, hash-verified

31 )
32
33 def test_ssl_with_invalid_cert(self, request):
34 ssl_url = request.config.option.redis_ssl_url
35 sslclient = redis.from_url(ssl_url)
36 with pytest.raises(ConnectionError) as e:
37 sslclient.ping()
38 assert "SSL: CERTIFICATE_VERIFY_FAILED" in str(e.value)
39 sslclient.close()
40
41 def test_ssl_connection(self, request):
42 ssl_url = request.config.option.redis_ssl_url

Callers

nothing calls this directly

Calls 3

from_urlMethod · 0.45
pingMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected