diff --git a/tests/app/clients/test_aws_cloudwatch.py b/tests/app/clients/test_aws_cloudwatch.py index fdb653f5b..419903617 100644 --- a/tests/app/clients/test_aws_cloudwatch.py +++ b/tests/app/clients/test_aws_cloudwatch.py @@ -18,7 +18,7 @@ def test_check_sms_no_event_error_condition(notify_api, mocker): try: aws_cloudwatch_client.check_sms(message_id, notification_id) assert 1 == 0 - except Exception as e: + except Exception: assert 1 == 1 diff --git a/tests/app/dao/test_provider_details_dao.py b/tests/app/dao/test_provider_details_dao.py index 35613dcca..73335e8fa 100644 --- a/tests/app/dao/test_provider_details_dao.py +++ b/tests/app/dao/test_provider_details_dao.py @@ -124,7 +124,7 @@ def test_get_alternative_sms_provider_returns_expected_provider(identifier, expe try: get_alternative_sms_provider(identifier) assert 1 == 0 - except Exception as e: + except Exception: assert 1 == 1 diff --git a/tests/app/dao/test_service_email_reply_to_dao.py b/tests/app/dao/test_service_email_reply_to_dao.py index 48a6b4554..58784f240 100644 --- a/tests/app/dao/test_service_email_reply_to_dao.py +++ b/tests/app/dao/test_service_email_reply_to_dao.py @@ -127,11 +127,11 @@ def test_add_reply_to_email_address_ensure_there_is_not_more_than_one_default(sa create_reply_to_email(service=sample_service, email_address='second@email.com', is_default=True) try: - # flake8 doesn't like raise with a generic Exception + # flake8 doesn't like raise with a generic Exception add_reply_to_email_address_for_service( service_id=sample_service.id, email_address='third_email@address.com', is_default=False) assert 1 == 0 - except Exception as e: + except Exception: assert 1 == 1 diff --git a/tests/app/delivery/test_send_to_providers.py b/tests/app/delivery/test_send_to_providers.py index c0ebe2b81..4e2631b79 100644 --- a/tests/app/delivery/test_send_to_providers.py +++ b/tests/app/delivery/test_send_to_providers.py @@ -71,9 +71,10 @@ def test_provider_to_use_raises_if_no_active_providers(mocker, restore_provider_ try: send_to_providers.provider_to_use('sms') assert 1 == 0 - except Exception as e: + except Exception: assert 1 == 1 + def test_should_send_personalised_template_to_correct_sms_provider_and_persist( sample_sms_template_with_html, mocker @@ -528,7 +529,7 @@ def test_should_not_update_notification_if_research_mode_on_exception( try: send_to_providers.send_sms_to_provider(sample_notification) assert 1 == 0 - except Exception as e: + except Exception: assert 1 == 1 persisted_notification = notifications_dao.get_notification_by_id(sample_notification.id) @@ -603,7 +604,7 @@ def test_should_set_notification_billable_units_and_reduces_provider_priority_if try: send_to_providers.send_sms_to_provider(sample_notification) assert 1 == 0 - except Exception as e: + except Exception: assert 1 == 1 assert sample_notification.billable_units == 1