

def test__dereference(self):
    db = self.client.a
    collection = db.a
    to_insert = {
        '_id': 'a',
        'aa': 'bb',
    }
    collection.insert(to_insert)
    a = db.dereference(DBRef('a', 'a', db.name))
    self.assertEqual(to_insert, a)

dataset/ETHPy150Open vmalloc/mongomock/tests/test__mongomock.py DatabaseGettingTest.test__dereference/original