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

Method test_cursor_command

test/test_database.py:434–446  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

432 self.db.test.drop()
433
434 def test_cursor_command(self):
435 db = self.client.pymongo_test
436 db.test.drop()
437
438 docs = [{"_id": i, "doc": i} for i in range(3)]
439 db.test.insert_many(docs)
440
441 cursor = db.cursor_command("find", "test")
442
443 self.assertIsInstance(cursor, CommandCursor)
444
445 result_docs = cursor.to_list()
446 self.assertEqual(docs, result_docs)
447
448 def test_cursor_command_invalid(self):
449 with self.assertRaises(InvalidOperation):

Callers

nothing calls this directly

Calls 4

dropMethod · 0.45
insert_manyMethod · 0.45
cursor_commandMethod · 0.45
to_listMethod · 0.45

Tested by

no test coverage detected