fix flake8

This commit is contained in:
Kenneth Kehl
2023-07-21 11:32:31 -07:00
parent 89b733dd54
commit 6b83d7a55a
4 changed files with 8 additions and 7 deletions

View File

@@ -18,7 +18,7 @@ def test_check_sms_no_event_error_condition(notify_api, mocker):
try: try:
aws_cloudwatch_client.check_sms(message_id, notification_id) aws_cloudwatch_client.check_sms(message_id, notification_id)
assert 1 == 0 assert 1 == 0
except Exception as e: except Exception:
assert 1 == 1 assert 1 == 1

View File

@@ -124,7 +124,7 @@ def test_get_alternative_sms_provider_returns_expected_provider(identifier, expe
try: try:
get_alternative_sms_provider(identifier) get_alternative_sms_provider(identifier)
assert 1 == 0 assert 1 == 0
except Exception as e: except Exception:
assert 1 == 1 assert 1 == 1

View File

@@ -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) create_reply_to_email(service=sample_service, email_address='second@email.com', is_default=True)
try: 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( add_reply_to_email_address_for_service(
service_id=sample_service.id, email_address='third_email@address.com', is_default=False) service_id=sample_service.id, email_address='third_email@address.com', is_default=False)
assert 1 == 0 assert 1 == 0
except Exception as e: except Exception:
assert 1 == 1 assert 1 == 1

View File

@@ -71,9 +71,10 @@ def test_provider_to_use_raises_if_no_active_providers(mocker, restore_provider_
try: try:
send_to_providers.provider_to_use('sms') send_to_providers.provider_to_use('sms')
assert 1 == 0 assert 1 == 0
except Exception as e: except Exception:
assert 1 == 1 assert 1 == 1
def test_should_send_personalised_template_to_correct_sms_provider_and_persist( def test_should_send_personalised_template_to_correct_sms_provider_and_persist(
sample_sms_template_with_html, sample_sms_template_with_html,
mocker mocker
@@ -528,7 +529,7 @@ def test_should_not_update_notification_if_research_mode_on_exception(
try: try:
send_to_providers.send_sms_to_provider(sample_notification) send_to_providers.send_sms_to_provider(sample_notification)
assert 1 == 0 assert 1 == 0
except Exception as e: except Exception:
assert 1 == 1 assert 1 == 1
persisted_notification = notifications_dao.get_notification_by_id(sample_notification.id) 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: try:
send_to_providers.send_sms_to_provider(sample_notification) send_to_providers.send_sms_to_provider(sample_notification)
assert 1 == 0 assert 1 == 0
except Exception as e: except Exception:
assert 1 == 1 assert 1 == 1
assert sample_notification.billable_units == 1 assert sample_notification.billable_units == 1