def test_s3_put_more_than_1000_items(self):
    self.s3_client.create_bucket(Bucket=TEST_BUCKET_NAME_2)
    for i in range(0, 1010, 1):
        body = ('test-' + str(i))
        key = ('test-key-' + str(i))
        self.s3_client.put_object(Bucket=TEST_BUCKET_NAME_2, Key=key, Body=body)
    resp = self.s3_client.get_object(Bucket=TEST_BUCKET_NAME_2, Key='test-key-1009')
    self.assertEqual(to_str(resp['Body'].read()), 'test-1009')
    resp = self.s3_client.get_object(Bucket=TEST_BUCKET_NAME_2, Key='test-key-0')
    self.assertEqual(to_str(resp['Body'].read()), 'test-0')
    resp = self.s3_client.list_objects(Bucket=TEST_BUCKET_NAME_2, MaxKeys=1010)
    self.assertEqual(len(resp['Contents']), 1010)
    resp = self.s3_client.list_objects(Bucket=TEST_BUCKET_NAME_2)
    self.assertEqual(len(resp['Contents']), 1000)
    next_marker = resp['NextMarker']
    resp = self.s3_client.list_objects(Bucket=TEST_BUCKET_NAME_2, Marker=next_marker)
    self.assertEqual(len(resp['Contents']), 10)
def test_s3_put_more_than_1000_items(self):
    self.s3_client.create_bucket(Bucket=TEST_BUCKET_NAME_2)
    for i in range(0, 1010, 1):
        body = ('test-' + str(i))
        key = ('test-key-' + str(i))
        self.s3_client.put_object(Bucket=TEST_BUCKET_NAME_2, Key=key, Body=body)
    resp = self.s3_client.get_object(Bucket=TEST_BUCKET_NAME_2, Key='test-key-1009')
    self.assertEqual(to_str(resp['Body'].read()), 'test-1009')
    resp = self.s3_client.get_object(Bucket=TEST_BUCKET_NAME_2, Key='test-key-0')
    self.assertEqual(to_str(resp['Body'].read()), 'test-0')
    resp = self.s3_client.list_objects(Bucket=TEST_BUCKET_NAME_2, MaxKeys=1010)
    self.assertEqual(len(resp['Contents']), 1010)
    resp = self.s3_client.list_objects(Bucket=TEST_BUCKET_NAME_2)
    self.assertEqual(len(resp['Contents']), 1000)
    next_marker = resp['NextMarker']
    resp = self.s3_client.list_objects(Bucket=TEST_BUCKET_NAME_2, Marker=next_marker)
    self.assertEqual(len(resp['Contents']), 10)