(self)
| 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): |
nothing calls this directly
no test coverage detected