MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / test_cert_ssl_uri_support

Method test_cert_ssl_uri_support

test/test_ssl.py:281–292  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

279 @client_context.require_no_auth
280 @ignore_deprecations
281 def test_cert_ssl_uri_support(self):
282 # Expects the server to be running with server.pem and ca.pem
283 #
284 # --sslPEMKeyFile=/path/to/pymongo/test/certificates/server.pem
285 # --sslCAFile=/path/to/pymongo/test/certificates/ca.pem
286 #
287 uri_fmt = (
288 "mongodb://localhost/?ssl=true&tlsCertificateKeyFile=%s&tlsAllowInvalidCertificates"
289 "=%s&tlsCAFile=%s&tlsAllowInvalidHostnames=false"
290 )
291 client = self.simple_client(uri_fmt % (CLIENT_PEM, "true", CA_PEM))
292 self.assertClientWorks(client)
293
294 @unittest.skipIf(
295 "PyPy" in sys.version and not _IS_SYNC,

Callers

nothing calls this directly

Calls 2

assertClientWorksMethod · 0.95
simple_clientMethod · 0.45

Tested by

no test coverage detected