def test_chunked_itersearch_performs_scroll(self):
        for size in (10, 100):
            scrollCounter = 0
            docsCounter = 0
            time.sleep(1)
            for docs in self.ss.itersearch(index=self._index,
                                           doc_type=self._doc_type,
                                           body=dict(
                                               query=dict(match_all={})),
                                           scroll='10m', size=size):
                scrollCounter += 1
                docsCounter += len(docs)

            self.assertEquals(scrollCounter, self._total_docs / size + 1)
dataset/ETHPy150Open wingify/superelasticsearch/tests/test_superelasticsearch.py/TestItersearch.test_chunked_itersearch_performs_scroll/original