MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / test_allow_disk_use

Method test_allow_disk_use

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

Source from the content-addressed store, hash-verified

144 self.assertFalse(cursor._exhaust)
145
146 def test_allow_disk_use(self):
147 db = self.db
148 db.pymongo_test.drop()
149 coll = db.pymongo_test
150
151 with self.assertRaises(TypeError):
152 coll.find().allow_disk_use("baz") # type: ignore[arg-type]
153
154 cursor = coll.find().allow_disk_use(True)
155 self.assertEqual(True, cursor._allow_disk_use)
156 cursor = coll.find().allow_disk_use(False)
157 self.assertEqual(False, cursor._allow_disk_use)
158
159 def test_max_time_ms(self):
160 db = self.db

Callers

nothing calls this directly

Calls 3

dropMethod · 0.45
allow_disk_useMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected