

def test__drop_database(self):
    db = self.client.a
    collection = db.a
    doc_id = collection.insert({
        'aa': 'bb',
    })
    result = collection.find({
        '_id': doc_id,
    })
    self.assertEqual(result.count(), 1)
    self.client.drop_database('a')
    result = collection.find({
        '_id': doc_id,
    })
    self.assertEqual(result.count(), 0)
    db = self.client.a
    collection = db.a
    doc_id = collection.insert({
        'aa': 'bb',
    })
    result = collection.find({
        '_id': doc_id,
    })
    self.assertEqual(result.count(), 1)
    self.client.drop_database(db)
    result = collection.find({
        '_id': doc_id,
    })
    self.assertEqual(db.count(), 0)

dataset/ETHPy150Open vmalloc/mongomock/tests/test__mongomock.py DatabaseGettingTest.test__drop_database/VarMisuse@195/234 `result`->`db`