def testBaseModelMemcacheWrappedGetAllFilter(self):
    filters = (('foo =', 'bar'), ('one =', 1))
    filter_str = '_foo =,bar_|_one =,1_'
    memcache_key = 'mwgaf_%s%s' % (models.BaseModel.kind(), filter_str)
    entities = ['the', 'entities']

    self.mox.StubOutWithMock(models, 'memcache', self.mox.CreateMockAnything())
    self.mox.StubOutWithMock(models.BaseModel, 'all')
    mock_query = self.mox.CreateMockAnything()

    models.memcache.get(memcache_key).AndReturn(None)
    models.BaseModel.all().AndReturn(mock_query)
    for filt, value in filters:
      mock_query.filter(filt, value).AndReturn(mock_query)
    mock_query.fetch(1000).AndReturn(entities)
    models.memcache.set(
        memcache_key, entities, models.MEMCACHE_SECS).AndReturn(None)

    self.mox.ReplayAll()
    self.assertEqual(
        entities, models.BaseModel.MemcacheWrappedGetAllFilter(filters))
    self.mox.VerifyAll()
Handle the result of an iteration in C{_find}.
dataset/ETHPy150Open google/simian/src/tests/simian/mac/models/base_test.py/ModelsModuleTest.testBaseModelMemcacheWrappedGetAllFilter--crossover with--dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/runtime/south/plugins/storage/twistedimpl/securedht/append_server.py/ValueListSpiderCrawl._nodesFound