From 833694a144efb8bdd350525c3fb454c89f536ccf Mon Sep 17 00:00:00 2001 From: Simon Saliba <34103869+simon-saliba@users.noreply.github.com> Date: Wed, 2 Mar 2022 18:50:43 +0100 Subject: [PATCH] fix tests: changed random bucket name to full lowercase to match new AWS specifications (#919) Co-authored-by: simonsaliba --- tests/conftest.py | 2 +- tests/test_basic_s3.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 79629d44..5a76f397 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -40,7 +40,7 @@ def random_name(): The string contains only symbols allowed for s3 buckets (alphanumeric, dot and hyphen). """ - return ''.join(random.sample(string.ascii_letters, k=40)) + return ''.join(random.sample(string.ascii_lowercase, k=26)) def assert_status_code(response, status_code): diff --git a/tests/test_basic_s3.py b/tests/test_basic_s3.py index 0c476989..2bc4e40a 100644 --- a/tests/test_basic_s3.py +++ b/tests/test_basic_s3.py @@ -519,7 +519,7 @@ async def test_presign_sigv4(s3_client, bucket_name, aio_session, 'get_object', Params={'Bucket': bucket_name, 'Key': key}) msg = "Host was suppose to be the us-east-1 endpoint, " \ "instead got: %s" % presigned_url - assert presigned_url.startswith('https://s3.amazonaws.com/%s/%s' + assert presigned_url.startswith('https://%s.s3.amazonaws.com/%s' % (bucket_name, key)), msg # Try to retrieve the object using the presigned url.