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

Method test_repr_srv_host

test/test_client.py:996–1003  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

994 self.assertEqual(client_two, client)
995
996 def test_repr_srv_host(self):
997 client = MongoClient("mongodb+srv://test1.test.build.10gen.cc/", connect=False)
998 # before srv resolution
999 self.assertIn("host='mongodb+srv://test1.test.build.10gen.cc'", repr(client))
1000 client._connect()
1001 # after srv resolution
1002 self.assertIn("host=['localhost.test.build.10gen.cc:", repr(client))
1003 client.close()
1004
1005 def test_getters(self):
1006 wait_until(lambda: client_context.nodes == self.client.nodes, "find all nodes")

Callers

nothing calls this directly

Calls 3

_connectMethod · 0.95
closeMethod · 0.95
MongoClientClass · 0.90

Tested by

no test coverage detected