MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / connect

Method connect

test/atlas/test_connection.py:50–57  ·  view source on GitHub ↗
(self, uri)

Source from the content-addressed store, hash-verified

48
49class TestAtlasConnect(PyMongoTestCase):
50 def connect(self, uri):
51 if not uri:
52 raise Exception("Must set env variable to test.")
53 client = self.simple_client(uri)
54 # No TLS error
55 client.admin.command("ping")
56 # No auth error
57 client.test.test.count_documents({})
58
59 @unittest.skipUnless(_has_sni(True), "Free tier requires SNI support")
60 def test_free_tier(self):

Callers 14

test_free_tierMethod · 0.95
test_replica_setMethod · 0.95
test_sharded_clusterMethod · 0.95
test_tls_11Method · 0.95
test_tls_12Method · 0.95
connect_srvMethod · 0.95
test_x509_with_certMethod · 0.95
check_ocspFunction · 0.45
test_socket_closedMethod · 0.45
test_socket_checkerMethod · 0.45
delayed_connectMethod · 0.45
test_socket_closedMethod · 0.45

Calls 3

simple_clientMethod · 0.45
commandMethod · 0.45
count_documentsMethod · 0.45

Tested by

no test coverage detected