forked from TrueCloudLab/s3-tests
chore:Bump the list-objects to paginator
This commit is contained in:
parent
64bdc3beec
commit
20aa9aa071
1 changed files with 10 additions and 2 deletions
|
@ -2036,12 +2036,20 @@ def test_multi_object_delete_key_limit():
|
||||||
bucket_name = _create_objects(keys=key_names)
|
bucket_name = _create_objects(keys=key_names)
|
||||||
client = get_client()
|
client = get_client()
|
||||||
|
|
||||||
|
paginator = client.get_paginator('list_objects')
|
||||||
|
pages = paginator.paginate(Bucket=bucket_name)
|
||||||
|
numKeys = 0
|
||||||
|
for page in pages:
|
||||||
|
numKeys += len(page['Contents'])
|
||||||
|
|
||||||
response = client.list_objects(Bucket=bucket_name)
|
response = client.list_objects(Bucket=bucket_name)
|
||||||
eq(len(response['Contents']), 1001)
|
eq(numKeys, 1001)
|
||||||
|
|
||||||
objs_dict = _make_objs_dict(key_names=key_names)
|
objs_dict = _make_objs_dict(key_names=key_names)
|
||||||
e = assert_raises(ClientError,client.delete_objects,Bucket=bucket_name,Delete=objs_dict)
|
e = assert_raises(ClientError,client.delete_objects,Bucket=bucket_name,Delete=objs_dict)
|
||||||
eq(e.response['Error']['Code'], 400)
|
|
||||||
|
status, error_code = _get_status_and_error_code(e.response)
|
||||||
|
eq(status, 400)
|
||||||
|
|
||||||
@attr(resource='object')
|
@attr(resource='object')
|
||||||
@attr(method='put')
|
@attr(method='put')
|
||||||
|
|
Loading…
Reference in a new issue