(self)
| 180 | self.assertEqual(self.collation.document, command["deletes"][0]["collation"]) |
| 181 | |
| 182 | def test_update(self): |
| 183 | self.db.test.replace_one({"foo": 42}, {"foo": 43}, collation=self.collation) |
| 184 | command = self.listener.started_events[0].command |
| 185 | self.assertEqual(self.collation.document, command["updates"][0]["collation"]) |
| 186 | |
| 187 | self.listener.reset() |
| 188 | self.db.test.update_one({"foo": 42}, {"$set": {"foo": 43}}, collation=self.collation) |
| 189 | command = self.listener.started_events[0].command |
| 190 | self.assertEqual(self.collation.document, command["updates"][0]["collation"]) |
| 191 | |
| 192 | self.listener.reset() |
| 193 | self.db.test.update_many({"foo": 42}, {"$set": {"foo": 43}}, collation=self.collation) |
| 194 | command = self.listener.started_events[0].command |
| 195 | self.assertEqual(self.collation.document, command["updates"][0]["collation"]) |
| 196 | |
| 197 | def test_find_and(self): |
| 198 | self.db.test.find_one_and_delete({"foo": 42}, collation=self.collation) |
nothing calls this directly
no test coverage detected