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

Method test_unacknowledged_write

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

Source from the content-addressed store, hash-verified

264 self.assertNotIn("fieldname", indexes)
265
266 def test_unacknowledged_write(self):
267 unacknowledged = WriteConcern(w=0)
268 collection = self.db.get_collection("test", write_concern=unacknowledged)
269 with self.assertRaises(ConfigurationError):
270 collection.update_one(
271 {"hello": "world"}, {"$set": {"hello": "moon"}}, collation=self.collation
272 )
273 update_one = UpdateOne(
274 {"hello": "world"}, {"$set": {"hello": "moon"}}, collation=self.collation
275 )
276 with self.assertRaises(ConfigurationError):
277 collection.bulk_write([update_one])
278
279 def test_cursor_collation(self):
280 self.db.test.insert_one({"hello": "world"})

Callers

nothing calls this directly

Calls 5

WriteConcernClass · 0.90
UpdateOneClass · 0.90
get_collectionMethod · 0.45
update_oneMethod · 0.45
bulk_writeMethod · 0.45

Tested by

no test coverage detected