fix flake8

This commit is contained in:
Kenneth Kehl
2024-05-31 09:47:19 -07:00
parent 2f366ff65c
commit 2414b09c0f
2 changed files with 3 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ def get_s3_object(
teststr = str(s3.Bucket(bucket_name).creation_date).lower()
if "magicmock" not in teststr:
raise Exception(
f"Test is not mocked, use @mock_aws or the relevant mocker.patch to avoid accessing S3"
"Test is not mocked, use @mock_aws or the relevant mocker.patch to avoid accessing S3"
)
return obj

View File

@@ -47,7 +47,7 @@ def s3upload(
teststr = str(_s3.Bucket(bucket_name).creation_date).lower()
if "magicmock" not in teststr:
raise Exception(
f"Test is not mocked, use @mock_aws or the relevant mocker.patch to avoid accessing S3"
"Test is not mocked, use @mock_aws or the relevant mocker.patch to avoid accessing S3"
)
key = _s3.Object(bucket_name, file_location)
@@ -102,7 +102,7 @@ def s3download(
teststr = str(s3.Bucket(bucket_name).creation_date).lower()
if "magicmock" not in teststr:
raise Exception(
f"Test is not mocked, use @mock_aws or the relevant mocker.patch to avoid accessing S3"
"Test is not mocked, use @mock_aws or the relevant mocker.patch to avoid accessing S3"
)
return key.get()["Body"]
except botocore.exceptions.ClientError as error: