def testAll(self):
    mock_model = self.mox.CreateMockAnything()
    mock_query = self.mox.CreateMockAnything()

    self._StubGetModelClass()
    ads = self._GetAds()

    ads.model = mock_model
    sessions = [1, 2, 3]
    mock_model.all().AndReturn(mock_query)

    self.mox.StubOutWithMock(gaeserver.gae_util, 'QueryIterator')
    gaeserver.gae_util.QueryIterator(mock_query, step=100).AndReturn(sessions)

    self.mox.ReplayAll()
    output = []
    for i in ads.All():
      output.append(i)
    self.assertEqual(output, sessions)
    self.mox.VerifyAll()
Returns a context manager for cache batch mode.  This is used
dataset/ETHPy150Open google/simian/src/tests/simian/auth/gaeserver_test.py/Auth1ServerDatastoreSessionTest.testAll--crossover with--dataset/ETHPy150Open fengsp/rc/rc/cache.py/BaseCache.batch_mode