MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / test_delete

Method test_delete

test/test_collation.py:172–180  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

170 )
171
172 def test_delete(self):
173 self.db.test.delete_one({"foo": 42}, collation=self.collation)
174 command = self.listener.started_events[0].command
175 self.assertEqual(self.collation.document, command["deletes"][0]["collation"])
176
177 self.listener.reset()
178 self.db.test.delete_many({"foo": 42}, collation=self.collation)
179 command = self.listener.started_events[0].command
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)

Callers

nothing calls this directly

Calls 3

delete_oneMethod · 0.45
resetMethod · 0.45
delete_manyMethod · 0.45

Tested by

no test coverage detected