def test_equality(self):
        obj_id = ObjectId("1234567890abcdef12345678")

        self.assertEqual(DBRef('foo', 5), DBRef('foo', 5))
        self.assertEqual(DBRef("coll", obj_id), DBRef(u("coll"), obj_id))
        self.assertNotEqual(DBRef("coll", obj_id),
                            DBRef(u("coll"), obj_id, "foo"))
        self.assertNotEqual(DBRef("coll", obj_id), DBRef("col", obj_id))
        self.assertNotEqual(DBRef("coll", obj_id),
                            DBRef("coll", ObjectId(b"123456789011")))
        self.assertNotEqual(DBRef("coll", obj_id), 4)
        self.assertEqual(DBRef("coll", obj_id, "foo"),
                         DBRef(u("coll"), obj_id, "foo"))
        self.assertNotEqual(DBRef("coll", obj_id, "foo"),
                            DBRef(u("coll"), obj_id, "bar"))

        # Explicitly test inequality
        self.assertFalse(DBRef('foo', 5) != DBRef('foo', 5))
        self.assertFalse(DBRef("coll", obj_id) != DBRef(u("coll"), obj_id))
        self.assertFalse(DBRef("coll", obj_id, "foo") !=
                         DBRef(u("coll"), obj_id, "foo"))
dataset/ETHPy150Open mongodb/mongo-python-driver/test/test_dbref.py/TestDBRef.test_equality/original