

def test_pickling(self):
    dbr = DBRef('coll', 5, foo='bar')
    for protocol in [0, 1, 2, (- 1)]:
        pkl = pickle.dumps(dbr, protocol=self)
        dbr2 = pickle.loads(pkl)
        self.assertEqual(dbr, dbr2)

dataset/ETHPy150Open mongodb/mongo-python-driver/test/test_dbref.py TestDBRef.test_pickling/VarMisuse@51/64 `protocol`->`self`