(self)
| 1301 | coll.insert_one({"_id": 1}) |
| 1302 | |
| 1303 | def test_error_code(self): |
| 1304 | try: |
| 1305 | self.db.test.update_many({}, {"$thismodifierdoesntexist": 1}) |
| 1306 | except OperationFailure as exc: |
| 1307 | self.assertIn(exc.code, (9, 10147, 16840, 17009)) |
| 1308 | # Just check that we set the error document. Fields |
| 1309 | # vary by MongoDB version. |
| 1310 | self.assertIsNotNone(exc.details) |
| 1311 | else: |
| 1312 | self.fail("OperationFailure was not raised") |
| 1313 | |
| 1314 | def test_index_on_subfield(self): |
| 1315 | db = self.db |
nothing calls this directly
no test coverage detected