(self)
| 1879 | self.assertEqual(1, len(self.db.test.find({"query": {"$ne": None}}).to_list())) |
| 1880 | |
| 1881 | def test_min_query(self): |
| 1882 | self.db.drop_collection("test") |
| 1883 | self.db.test.insert_many([{"x": 1}, {"x": 2}]) |
| 1884 | self.db.test.create_index("x") |
| 1885 | |
| 1886 | cursor = self.db.test.find({"$min": {"x": 2}, "$query": {}}, hint="x_1") |
| 1887 | |
| 1888 | docs = cursor.to_list() |
| 1889 | self.assertEqual(1, len(docs)) |
| 1890 | self.assertEqual(2, docs[0]["x"]) |
| 1891 | |
| 1892 | def test_numerous_inserts(self): |
| 1893 | # Ensure we don't exceed server's maxWriteBatchSize size limit. |
nothing calls this directly
no test coverage detected