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

Method asyncSetUp

test/asynchronous/test_pooling.py:156–163  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

154
155 @async_client_context.require_connection
156 async def asyncSetUp(self):
157 await super().asyncSetUp()
158 self.c = await self.async_rs_or_single_client()
159 db = self.c[DB]
160 await db.unique.drop()
161 await db.test.drop()
162 await db.unique.insert_one({"_id": "jesse"})
163 await db.test.insert_many([{} for _ in range(10)])
164
165 async def create_pool(self, pair=None, *args, **kwargs):
166 if pair is None:

Callers

nothing calls this directly

Calls 4

dropMethod · 0.45
insert_oneMethod · 0.45
insert_manyMethod · 0.45

Tested by

no test coverage detected