diff --git a/tests/app/aws/test_s3.py b/tests/app/aws/test_s3.py index 2e2875be7..95b44f557 100644 --- a/tests/app/aws/test_s3.py +++ b/tests/app/aws/test_s3.py @@ -128,9 +128,8 @@ def test_download_from_s3_no_credentials_error(mocker): download_from_s3( "test_bucket", "test_key", "test_file", "access_key", "secret_key", "region" ) - assert 1 == 0 - except botocore.exceptions.NoCredentialsError: - assert 1 == 1 + except Exception as e: + assert isinstance(e, botocore.exceptions.NoCredentialsError) mock_logger.exception.assert_called_once_with("Credentials not found")