

def testListItems(self):
    baseline = self._GetCounters()
    lastmarker = None
    for item in self.listitems:
        self._RunAsync(self.object_store.Put, '/'.join((self.listkeyA, item)), 'test')
        self._RunAsync(self.object_store.Put, '/'.join((self.listkeyB, item)), 'test')
    self._CheckCounters(baseline, 0, (len(self.listitems) * 2))
    resultlist = self._RunAsync(self.object_store.ListKeys, prefix=self.listkeyB)
    self.assertEquals(len(resultlist), len(self.listitems))
    for i in resultlist:
        self.assertTrue(i.startswith(self.listkeyB))
    resultlist = self._RunAsync(self.object_store.ListKeys, prefix=self.listkey, maxkeys=3)
    self.assertEquals(len(resultlist), 3)
    for i in resultlist:
        self.assertTrue(i.startswith(self.listkeyA))
    lastmarker = resultlist[(- 1)]
    resultlist = self._RunAsync(self.object_store.ListKeys, prefix=self.listkey, marker=lastmarker)
    self.assertEquals(len(resultlist), ((len(self.listitems) * 2) - 3))
    for i in resultlist:
        self.assertTrue((i > lastmarker))

dataset/ETHPy150Open viewfinderco/viewfinder/backend/storage/test/s3_object_store_test.py S3ObjectStoreTestCase.testListItems/original