

@unittest.skipUnless(RUN_INDEXES, 'RUN_INDEXES is 0')
def test_index_pagination_stream_return_terms(self):
    if (not self.is_2i_supported()):
        raise unittest.SkipTest('2I is not supported')
    (bucket, o1, o2, o3, o4) = self._create_index_objects()
    stream = o4.stream_index('field1_bin', 'val0', 'val5', max_results=2, return_terms=True)
    results = []
    for result in stream:
        results.extend(result)
    self.assertLessEqual(2, len(results))
    self.assertEqual([('val1', o1.key), ('val2', o2.key)], results)
    self.assertIsNotNone(stream.continuation)
    self.assertTrue(stream.has_next_page())
    results = []
    for result in stream.next_page():
        results.extend(result)
    self.assertLessEqual(2, len(results))
    self.assertEqual([('val3', o3.key), ('val4', o4.key)], results)

dataset/ETHPy150Open basho/riak-python-client/riak/tests/test_2i.py TwoITests.test_index_pagination_stream_return_terms/VarMisuse@61/100 `bucket`->`o4`