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

Method test_pickle_NotPrimaryError

test/test_errors.py:78–80  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

76 self.assertEqual(exc1._max_wire_version, exc2._max_wire_version)
77
78 def test_pickle_NotPrimaryError(self):
79 exc = NotPrimaryError("not primary test", {"errmsg": "error"})
80 self.assertPyMongoErrorEqual(exc, pickle.loads(pickle.dumps(exc)))
81
82 def test_pickle_OperationFailure(self):
83 exc = OperationFailure("error", code=5, details={}, max_wire_version=7)

Callers

nothing calls this directly

Calls 2

NotPrimaryErrorClass · 0.90

Tested by

no test coverage detected