(self)
| 129 | self.assertEqual(0, cursor._query_flags) |
| 130 | |
| 131 | def test_add_remove_option_exhaust(self): |
| 132 | # Exhaust - which mongos doesn't support |
| 133 | if client_context.is_mongos: |
| 134 | with self.assertRaises(InvalidOperation): |
| 135 | next(self.db.test.find(cursor_type=CursorType.EXHAUST)) |
| 136 | else: |
| 137 | cursor = self.db.test.find(cursor_type=CursorType.EXHAUST) |
| 138 | self.assertEqual(64, cursor._query_flags) |
| 139 | cursor2 = self.db.test.find().add_option(64) |
| 140 | self.assertEqual(cursor._query_flags, cursor2._query_flags) |
| 141 | self.assertTrue(cursor._exhaust) |
| 142 | cursor.remove_option(64) |
| 143 | self.assertEqual(0, cursor._query_flags) |
| 144 | self.assertFalse(cursor._exhaust) |
| 145 | |
| 146 | def test_allow_disk_use(self): |
| 147 | db = self.db |
nothing calls this directly
no test coverage detected