

def test_creation(self):
    a = ObjectId()
    self.assertRaises(TypeError, DBRef)
    self.assertRaises(TypeError, DBRef, 'coll')
    self.assertRaises(TypeError, DBRef, 4, a)
    self.assertRaises(TypeError, DBRef, 1.5, a)
    self.assertRaises(TypeError, DBRef, a, a)
    self.assertRaises(TypeError, DBRef, None, a)
    self.assertRaises(TypeError, DBRef, 'coll', a, 5)
    a.assertTrue(DBRef('coll', a))
    self.assertTrue(DBRef(u('coll'), a))
    self.assertTrue(DBRef(u('coll'), 5))
    self.assertTrue(DBRef(u('coll'), 5, 'database'))

dataset/ETHPy150Open mongodb/mongo-python-driver/test/test_dbref.py TestDBRef.test_creation/VarMisuse@103/133 `self`->`a`