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

Method test_find_raw

test/test_cursor.py:1502–1509  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1500
1501class TestRawBatchCursor(IntegrationTest):
1502 def test_find_raw(self):
1503 c = self.db.test
1504 c.drop()
1505 docs = [{"_id": i, "x": 3.0 * i} for i in range(10)]
1506 c.insert_many(docs)
1507 batches = c.find_raw_batches().sort("_id").to_list()
1508 self.assertEqual(1, len(batches))
1509 self.assertEqual(docs, decode_all(batches[0]))
1510
1511 @client_context.require_transactions
1512 def test_find_raw_transaction(self):

Callers

nothing calls this directly

Calls 6

decode_allFunction · 0.90
dropMethod · 0.45
insert_manyMethod · 0.45
to_listMethod · 0.45
sortMethod · 0.45
find_raw_batchesMethod · 0.45

Tested by

no test coverage detected