(self)
| 446 | self.assertEqual(0, first.get("num")) |
| 447 | |
| 448 | async def test_hint_by_name(self): |
| 449 | db = self.db |
| 450 | await db.test.drop() |
| 451 | |
| 452 | await db.test.insert_many([{"i": i} for i in range(100)]) |
| 453 | |
| 454 | await db.test.create_index([("i", DESCENDING)], name="fooindex") |
| 455 | first = await anext(db.test.find()) |
| 456 | self.assertEqual(0, first.get("i")) |
| 457 | first = await anext(db.test.find().hint("fooindex")) |
| 458 | self.assertEqual(99, first.get("i")) |
| 459 | |
| 460 | async def test_limit(self): |
| 461 | db = self.db |
nothing calls this directly
no test coverage detected