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

Method test_get_database_default

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

Source from the content-addressed store, hash-verified

295 self.assertEqual(Database(c, "foo"), c.get_default_database())
296
297 def test_get_database_default(self):
298 c = self.rs_or_single_client(
299 "mongodb://%s:%d/foo" % (client_context.host, client_context.port),
300 connect=False,
301 )
302 self.assertEqual(Database(c, "foo"), c.get_database())
303
304 def test_get_database_default_error(self):
305 # URI with no database.

Callers

nothing calls this directly

Calls 3

DatabaseClass · 0.90
rs_or_single_clientMethod · 0.80
get_databaseMethod · 0.45

Tested by

no test coverage detected