From d8e69a9a36ecede13120079ba3731ef64b88b2b6 Mon Sep 17 00:00:00 2001 From: Gapex <1377762942@qq.com> Date: Tue, 17 Sep 2019 12:44:48 +0800 Subject: [PATCH] list with prifix --- tests/test_s3/test_s3.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_s3/test_s3.py b/tests/test_s3/test_s3.py index bbe5e19a3..2764ee2c5 100644 --- a/tests/test_s3/test_s3.py +++ b/tests/test_s3/test_s3.py @@ -1401,7 +1401,7 @@ def test_boto3_list_objects_v2_truncate_combined_keys_and_folders(): s3.put_object(Bucket='mybucket', Key='3/4', Body='') s3.put_object(Bucket='mybucket', Key='4', Body='') - resp = s3.list_objects_v2(Bucket='mybucket', MaxKeys=2, Delimiter='/') + resp = s3.list_objects_v2(Bucket='mybucket', Prefix='', MaxKeys=2, Delimiter='/') assert 'Delimiter' in resp assert resp['IsTruncated'] is True assert resp['KeyCount'] == 2 @@ -1411,7 +1411,7 @@ def test_boto3_list_objects_v2_truncate_combined_keys_and_folders(): assert resp['CommonPrefixes'][0]['Prefix'] == '1/' last_tail = resp['NextContinuationToken'] - resp = s3.list_objects_v2(Bucket='mybucket', MaxKeys=2, Delimiter='/', StartAfter=last_tail) + resp = s3.list_objects_v2(Bucket='mybucket', MaxKeys=2, Prefix='', Delimiter='/', StartAfter=last_tail) assert resp['KeyCount'] == 2 assert resp['IsTruncated'] is False assert len(resp['Contents']) == 1