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

Method test_aggregate

test/asynchronous/test_session.py:648–661  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

646 await f.read()
647
648 async def test_aggregate(self):
649 client = self.client
650 coll = client.pymongo_test.collection
651
652 async def agg(session=None):
653 await (await coll.aggregate([], batchSize=2, session=session)).to_list()
654
655 # With empty collection.
656 await self._test_ops(client, (agg, [], {}))
657
658 # Now with documents.
659 await coll.insert_many([{} for _ in range(10)])
660 self.addAsyncCleanup(coll.drop)
661 await self._test_ops(client, (agg, [], {}))
662
663 async def test_killcursors(self):
664 client = self.client

Callers

nothing calls this directly

Calls 3

_test_opsMethod · 0.95
addAsyncCleanupMethod · 0.80
insert_manyMethod · 0.45

Tested by

no test coverage detected