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

Method test_read_concern

test/test_read_concern.py:47–60  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

45 client_context.client.pymongo_test.drop_collection("coll")
46
47 def test_read_concern(self):
48 rc = ReadConcern()
49 self.assertIsNone(rc.level)
50 self.assertTrue(rc.ok_for_legacy)
51
52 rc = ReadConcern("majority")
53 self.assertEqual("majority", rc.level)
54 self.assertFalse(rc.ok_for_legacy)
55
56 rc = ReadConcern("local")
57 self.assertEqual("local", rc.level)
58 self.assertTrue(rc.ok_for_legacy)
59
60 self.assertRaises(TypeError, ReadConcern, 42)
61
62 def test_read_concern_uri(self):
63 uri = f"mongodb://{client_context.pair}/?readConcernLevel=majority"

Callers

nothing calls this directly

Calls 1

ReadConcernClass · 0.90

Tested by

no test coverage detected