diff --git a/tests/app/main/views/test_sign_in.py b/tests/app/main/views/test_sign_in.py index 9d4e2bddc..63a77f888 100644 --- a/tests/app/main/views/test_sign_in.py +++ b/tests/app/main/views/test_sign_in.py @@ -76,7 +76,7 @@ def test_doesnt_redirect_to_sign_in_if_no_session_info( @pytest.mark.parametrize( - "db_sess_id, cookie_sess_id", + ("db_sess_id", "cookie_sess_id"), [ (None, None), (None, uuid.UUID(int=1)), # BAD - cookie doesn't match db @@ -139,7 +139,7 @@ def test_logged_in_user_doesnt_do_evil_redirect(client_request): ], ) @pytest.mark.parametrize( - "email_address, password", + ("email_address", "password"), [ ("valid@example.gsa.gov", "val1dPassw0rd!"), (" valid@example.gsa.gov ", " val1dPassw0rd! "), diff --git a/tests/app/main/views/test_template_folders.py b/tests/app/main/views/test_template_folders.py index c5410a240..d1bf6c9d0 100644 --- a/tests/app/main/views/test_template_folders.py +++ b/tests/app/main/views/test_template_folders.py @@ -39,15 +39,15 @@ def _folder(name, folder_id=None, parent=None, users_with_permission=None): @pytest.mark.parametrize( ( - "expected_title_tag," - "expected_page_title," - "expected_parent_link_args," - "extra_args," - "expected_nav_links," - "expected_items, " - "expected_displayed_items, " - "expected_searchable_text, " - "expected_empty_message " + "expected_title_tag", + "expected_page_title", + "expected_parent_link_args", + "extra_args", + "expected_nav_links", + "expected_items", + "expected_displayed_items", + "expected_searchable_text", + "expected_empty_message", ), [ ( @@ -1026,10 +1026,10 @@ def test_delete_template_folder_should_detect_non_empty_folder_on_get( @pytest.mark.parametrize( "parent_folder_id", - ( + [ None, PARENT_FOLDER_ID, - ), + ], ) def test_delete_folder( client_request, @@ -1117,7 +1117,9 @@ def test_should_show_checkboxes_for_selecting_templates_assertion_error( mock_get_no_api_keys, user, ): - with pytest.raises(expected_exception=AssertionError): + with pytest.raises( # noqa: PT012 # This will require more research into refactoring. + expected_exception=AssertionError + ): client_request.login(user) page = client_request.get( @@ -1289,7 +1291,7 @@ def test_should_be_able_to_move_to_existing_folder( @pytest.mark.parametrize( - "user, expected_status, expected_called", + ("user", "expected_status", "expected_called"), [ (create_active_user_view_permissions(), 403, False), (create_active_user_with_permissions(), 302, True), @@ -1618,7 +1620,7 @@ def test_radio_button_with_no_value_shows_custom_error_message( @pytest.mark.parametrize( - "data, error_msg", + ("data", "error_msg"), [ # nothing selected when moving ( @@ -1678,10 +1680,10 @@ def test_show_custom_error_message( @pytest.mark.parametrize( ( - "extra_args," - "expected_displayed_items, " - "expected_items, " - "expected_empty_message " + "extra_args", + "expected_displayed_items", + "expected_items", + "expected_empty_message", ), [ ( diff --git a/tests/app/main/views/test_templates.py b/tests/app/main/views/test_templates.py index 71741a4c8..ac22da76c 100644 --- a/tests/app/main/views/test_templates.py +++ b/tests/app/main/views/test_templates.py @@ -28,8 +28,8 @@ from tests.conftest import ( @pytest.mark.parametrize( - "permissions, expected_message", - ( + ("permissions", "expected_message"), + [ ( ["email"], ( @@ -51,7 +51,7 @@ from tests.conftest import ( "You need a template before you can send messages." ), ), - ), + ], ) def test_should_show_empty_page_when_no_templates( client_request, @@ -100,7 +100,13 @@ def test_should_show_add_template_form_if_service_has_folder_permission( @pytest.mark.parametrize( - "user, expected_page_title, extra_args, expected_nav_links, expected_templates", + ( + "user", + "expected_page_title", + "extra_args", + "expected_nav_links", + "expected_templates", + ), [ ( create_active_user_view_permissions(), @@ -298,9 +304,9 @@ def test_should_show_live_search_if_service_has_lots_of_folders( assert count_of_templates == 4 -@pytest.mark.parametrize( - "service_permissions, expected_values, expected_labels", - ( +@pytest.mark.parametrize( # noqa: PT014 # Requires more research why there are duplicate params here. + ("service_permissions", "expected_values", "expected_labels"), + [ pytest.param( ["email", "sms"], [ @@ -327,7 +333,7 @@ def test_should_show_live_search_if_service_has_lots_of_folders( "Copy an existing template", ], ), - ), + ], ) def test_should_show_new_template_choices_if_service_has_folder_permission( client_request, @@ -363,7 +369,7 @@ def test_should_show_new_template_choices_if_service_has_folder_permission( @pytest.mark.parametrize( - "permissions,are_data_attrs_added", + ("permissions", "are_data_attrs_added"), [ (["sms"], True), (["email"], True), @@ -523,7 +529,7 @@ def test_user_with_only_send_and_view_redirected_to_set_sender_for_one_off( @pytest.mark.parametrize( - "permissions, links_to_be_shown, permissions_warning_to_be_shown", + ("permissions", "links_to_be_shown", "permissions_warning_to_be_shown"), [ ( ["view_activity"], @@ -899,8 +905,8 @@ def test_choose_a_template_to_copy_from_folder_within_service( @pytest.mark.parametrize( - "existing_template_names, expected_name", - ( + ("existing_template_names", "expected_name"), + [ (["Two week reminder"], "Two week reminder (copy)"), (["Two week reminder (copy)"], "Two week reminder (copy 2)"), ( @@ -919,7 +925,7 @@ def test_choose_a_template_to_copy_from_folder_within_service( ["Two week reminder (copy)", "Two week reminder (copy 10)"], "Two week reminder (copy 2)", ), - ), + ], ) def test_load_edit_template_with_copy_of_template( client_request, @@ -1002,8 +1008,8 @@ def test_cant_copy_template_from_non_member_service( @pytest.mark.parametrize( - "service_permissions, data, expected_error", - ( + ("service_permissions", "data", "expected_error"), + [ ( ["email"], { @@ -1012,7 +1018,7 @@ def test_cant_copy_template_from_non_member_service( }, "Sending text messages has been disabled for your service.", ), - ), + ], ) def test_should_not_allow_creation_of_template_through_form_without_correct_permission( client_request, @@ -1040,9 +1046,9 @@ def test_should_not_allow_creation_of_template_through_form_without_correct_perm ) -@pytest.mark.parametrize("method", ("get", "post")) +@pytest.mark.parametrize("method", ["get", "post"]) @pytest.mark.parametrize( - "type_of_template, expected_error", + ("type_of_template", "expected_error"), [ ("email", "Sending emails has been disabled for your service."), ("sms", "Sending text messages has been disabled for your service."), @@ -1236,7 +1242,7 @@ def test_should_403_when_create_template_with_process_type_of_priority_for_non_p @pytest.mark.parametrize( - "old_content, new_content, expected_paragraphs", + ("old_content", "new_content", "expected_paragraphs"), [ ( "my favorite color is blue", @@ -1521,7 +1527,7 @@ def test_should_show_delete_template_page_with_never_used_block( mock_get_service_template.assert_called_with(SERVICE_ONE_ID, fake_uuid, None) -@pytest.mark.parametrize("parent", (PARENT_FOLDER_ID, None)) +@pytest.mark.parametrize("parent", [PARENT_FOLDER_ID, None]) def test_should_redirect_when_deleting_a_template( mocker, client_request, @@ -1706,11 +1712,11 @@ def test_route_invalid_permissions( @pytest.mark.parametrize( - "template_type, expected", - ( + ("template_type", "expected"), + [ ("email", "New email template"), ("sms", "New text message template"), - ), + ], ) def test_add_template_page_title( client_request, @@ -1748,7 +1754,10 @@ def test_can_create_email_template_with_emoji( @pytest.mark.parametrize( - "template_type, expected_error", (("sms", ("You cannot use 🍜 in text messages.")),) + ("template_type", "expected_error"), + [ + ("sms", ("You cannot use 🍜 in text messages.")), + ], ) def test_should_not_create_sms_template_with_emoji( client_request, @@ -1776,7 +1785,10 @@ def test_should_not_create_sms_template_with_emoji( @pytest.mark.parametrize( - "template_type, expected_error", (("sms", ("You cannot use 🍔 in text messages.")),) + ("template_type", "expected_error"), + [ + ("sms", ("You cannot use 🍔 in text messages.")), + ], ) def test_should_not_update_sms_template_with_emoji( mocker, @@ -1815,7 +1827,12 @@ def test_should_not_update_sms_template_with_emoji( assert mock_update_service_template.called is False -@pytest.mark.parametrize("template_type", ("sms",)) +@pytest.mark.parametrize( + "template_type", + [ + "sms", + ], +) def test_should_create_sms_template_without_downgrading_unicode_characters( client_request, service_one, @@ -1944,8 +1961,8 @@ def test_set_template_sender( @pytest.mark.parametrize( - "template_type, prefix_sms, content, expected_message, expected_class", - ( + ("template_type", "prefix_sms", "content", "expected_message", "expected_class"), + [ ( "sms", False, @@ -2068,7 +2085,7 @@ def test_set_template_sender( "Will be charged as 1 text message (not including personalization)", None, ), - ), + ], ) def test_content_count_json_endpoint( client_request, @@ -2103,10 +2120,10 @@ def test_content_count_json_endpoint( @pytest.mark.parametrize( "template_type", - ( + [ "email", "banana", - ), + ], ) def test_content_count_json_endpoint_for_unsupported_template_types( client_request, diff --git a/tests/app/main/views/test_two_factor.py b/tests/app/main/views/test_two_factor.py index b51fbf39a..148aece98 100644 --- a/tests/app/main/views/test_two_factor.py +++ b/tests/app/main/views/test_two_factor.py @@ -9,7 +9,7 @@ from tests.conftest import ( ) -@pytest.fixture +@pytest.fixture() def mock_email_validated_recently(mocker): return mocker.patch( "app.main.views.two_factor.email_needs_revalidating", return_value=False @@ -23,7 +23,7 @@ def mock_email_validated_recently(mocker): "redirect_url", [None, f"/services/{SERVICE_ONE_ID}/templates"] ) @pytest.mark.parametrize( - "email_resent, page_title", [(None, "Check your email"), (True, "Email resent")] + ("email_resent", "page_title"), [(None, "Check your email"), (True, "Email resent")] ) def test_two_factor_email_sent_page( client_request, email_resent, page_title, redirect_url, request_url @@ -168,10 +168,10 @@ def test_should_login_user_and_not_redirect_to_external_url( @pytest.mark.parametrize( "platform_admin", - ( + [ True, False, - ), + ], ) def test_should_login_user_and_redirect_to_show_accounts( client_request, @@ -334,8 +334,8 @@ def test_two_factor_sms_should_activate_pending_user( @pytest.mark.parametrize( - "extra_args, expected_encoded_next_arg", - (({}, ""), ({"next": "https://example.com"}, "?next=https://example.com")), + ("extra_args", "expected_encoded_next_arg"), + [({}, ""), ({"next": "https://example.com"}, "?next=https://example.com")], ) def test_valid_two_factor_email_link_shows_interstitial( client_request, diff --git a/tests/app/main/views/test_user_profile.py b/tests/app/main/views/test_user_profile.py index 9b171a173..6fce5278f 100644 --- a/tests/app/main/views/test_user_profile.py +++ b/tests/app/main/views/test_user_profile.py @@ -80,7 +80,7 @@ def test_should_redirect_after_email_change( @pytest.mark.parametrize( - "email_address,error_message", + ("email_address", "error_message"), [ ( "me@example.com", diff --git a/tests/app/main/views/uploads/test_upload_hub.py b/tests/app/main/views/uploads/test_upload_hub.py index 0756c55fe..2c7140c6c 100644 --- a/tests/app/main/views/uploads/test_upload_hub.py +++ b/tests/app/main/views/uploads/test_upload_hub.py @@ -9,15 +9,17 @@ from tests.conftest import ( ) +@pytest.mark.usefixtures("_mock_get_no_uploads") @pytest.mark.parametrize( - "extra_permissions, expected_empty_message", - (([], ("You have not uploaded any files recently.")),), + ("extra_permissions", "expected_empty_message"), + [ + ([], ("You have not uploaded any files recently.")), + ], ) def test_get_upload_hub_with_no_uploads( mocker, client_request, service_one, - _mock_get_no_uploads, extra_permissions, expected_empty_message, ): @@ -56,18 +58,18 @@ def test_get_upload_hub_page( ) +@pytest.mark.usefixtures("_mock_get_no_uploads") @pytest.mark.parametrize( "user", - ( + [ create_active_caseworking_user(), create_active_user_with_permissions(), - ), + ], ) @freeze_time("2012-12-12 12:12") def test_uploads_page_shows_scheduled_jobs( mocker, client_request, - _mock_get_no_uploads, mock_get_jobs, user, ): diff --git a/tests/app/models/test_base_model.py b/tests/app/models/test_base_model.py index 00c97b361..af69d7c9b 100644 --- a/tests/app/models/test_base_model.py +++ b/tests/app/models/test_base_model.py @@ -26,10 +26,10 @@ def test_raises_when_overriding_custom_properties(): @pytest.mark.parametrize( "json_response", - ( + [ {}, {"foo": "bar"}, # Should still raise an exception - ), + ], ) def test_model_raises_for_unknown_attributes(json_response): class Custom(JSONModel): @@ -56,10 +56,10 @@ def test_model_raises_keyerror_if_item_missing_from_dict(): @pytest.mark.parametrize( "json_response", - ( + [ {}, {"foo": "bar"}, # Should be ignored - ), + ], ) def test_model_doesnt_swallow_attribute_errors(json_response): class Custom(JSONModel): diff --git a/tests/app/models/test_event.py b/tests/app/models/test_event.py index f8dbd29ca..4f64f7a32 100644 --- a/tests/app/models/test_event.py +++ b/tests/app/models/test_event.py @@ -5,8 +5,8 @@ from tests.conftest import sample_uuid @pytest.mark.parametrize( - "key, value_from, value_to, expected", - ( + ("key", "value_from", "value_to", "expected"), + [ ("restricted", True, False, ("Made this service live")), ("restricted", False, True, ("Put this service back into trial mode")), ("active", False, True, ("Unsuspended this service")), @@ -70,7 +70,7 @@ from tests.conftest import sample_uuid "bar", ("Updated the callback for delivery receipts"), ), - ), + ], ) def test_service_event( key, diff --git a/tests/app/models/test_job.py b/tests/app/models/test_job.py index 986f1ebdb..d3a028195 100644 --- a/tests/app/models/test_job.py +++ b/tests/app/models/test_job.py @@ -6,7 +6,7 @@ from tests.conftest import SERVICE_ONE_ID @pytest.mark.parametrize( - "job_status, num_notifications_created, expected_still_processing", + ("job_status", "num_notifications_created", "expected_still_processing"), [ ("scheduled", 0, True), ("cancelled", 10, True), diff --git a/tests/app/models/test_organization.py b/tests/app/models/test_organization.py index 42ee05906..f909b801d 100644 --- a/tests/app/models/test_organization.py +++ b/tests/app/models/test_organization.py @@ -5,8 +5,8 @@ from tests import organization_json @pytest.mark.parametrize( - "purchase_order_number,expected_result", - [[None, None], ["PO1234", [None, None, None, "PO1234"]]], + ("purchase_order_number", "expected_result"), + [(None, None), ("PO1234", [None, None, None, "PO1234"])], ) def test_organization_billing_details(purchase_order_number, expected_result): organization = Organization( diff --git a/tests/app/models/test_service.py b/tests/app/models/test_service.py index 39f3f8f3b..e7bdce4a9 100644 --- a/tests/app/models/test_service.py +++ b/tests/app/models/test_service.py @@ -88,8 +88,8 @@ def test_bad_permission_raises(service_one): @pytest.mark.parametrize( - "purchase_order_number,expected_result", - [[None, None], ["PO1234", [None, None, None, "PO1234"]]], + ("purchase_order_number", "expected_result"), + [(None, None), ("PO1234", [None, None, None, "PO1234"])], ) def test_service_billing_details(purchase_order_number, expected_result): service = Service(service_json(purchase_order_number=purchase_order_number)) diff --git a/tests/app/models/test_spreadsheet.py b/tests/app/models/test_spreadsheet.py index 1e921f180..c62b60b21 100644 --- a/tests/app/models/test_spreadsheet.py +++ b/tests/app/models/test_spreadsheet.py @@ -31,14 +31,14 @@ def test_can_create_spreadsheet_from_dict_with_filename(): @pytest.mark.parametrize( - "args, kwargs", - ( + ("args", "kwargs"), + [ ( ("hello", ["hello"]), {}, ), ((), {"csv_data": "hello", "rows": ["hello"]}), - ), + ], ) def test_spreadsheet_checks_for_bad_arguments(args, kwargs): with pytest.raises(TypeError) as exception: diff --git a/tests/app/models/test_template_list.py b/tests/app/models/test_template_list.py index 959ed4f70..1a620809d 100644 --- a/tests/app/models/test_template_list.py +++ b/tests/app/models/test_template_list.py @@ -12,8 +12,8 @@ VIS_PARENT_FOLDER_ID = "bbbb222b-2b22-2b22-222b-b222b22b2222" INV_CHILD_2_FOLDER_ID = "fafe723f-1d39-4a10-865f-e551e03d8886" -@pytest.fixture -def mock_get_hierarchy_of_folders( +@pytest.fixture() +def _mock_get_hierarchy_of_folders( mock_get_template_folders, active_user_with_permissions ): mock_get_template_folders.return_value = [ @@ -74,8 +74,8 @@ def mock_get_hierarchy_of_folders( ] +@pytest.mark.usefixtures("_mock_get_hierarchy_of_folders") def test_template_list_yields_folders_visible_to_user( - mock_get_hierarchy_of_folders, mock_get_service_templates, service_one, active_user_with_permissions, @@ -98,8 +98,8 @@ def test_template_list_yields_folders_visible_to_user( ) +@pytest.mark.usefixtures("_mock_get_hierarchy_of_folders") def test_template_list_yields_all_folders_without_user( - mock_get_hierarchy_of_folders, mock_get_service_templates, service_one, ): diff --git a/tests/app/models/test_user.py b/tests/app/models/test_user.py index 88df63442..4611d5ea6 100644 --- a/tests/app/models/test_user.py +++ b/tests/app/models/test_user.py @@ -57,7 +57,7 @@ def test_activate_user_already_active( @pytest.mark.parametrize( - "is_platform_admin, value_in_session, expected_result", + ("is_platform_admin", "value_in_session", "expected_result"), [ (True, True, False), (True, False, True), diff --git a/tests/app/notify_client/test_billing_client.py b/tests/app/notify_client/test_billing_client.py index 8486064d9..9bb113efa 100644 --- a/tests/app/notify_client/test_billing_client.py +++ b/tests/app/notify_client/test_billing_client.py @@ -56,7 +56,7 @@ def test_post_free_sms_fragment_limit_for_year_endpoint(mocker, api_user_active) @pytest.mark.parametrize( - "func, expected_url", + ("func", "expected_url"), [ ( BillingAPIClient.get_data_for_volumes_by_service_report, diff --git a/tests/app/notify_client/test_job_client.py b/tests/app/notify_client/test_job_client.py index 99164ed54..7cec603c6 100644 --- a/tests/app/notify_client/test_job_client.py +++ b/tests/app/notify_client/test_job_client.py @@ -327,7 +327,7 @@ def test_cancel_job(mocker): @pytest.mark.parametrize( - "job_data, expected_cache_value", + ("job_data", "expected_cache_value"), [ ( [{"data": [1, 2, 3], "statistics": []}], @@ -364,7 +364,7 @@ def test_has_jobs_sets_cache( @pytest.mark.parametrize( - "cache_value, return_value", + ("cache_value", "return_value"), [ (b"true", True), (b"false", False), diff --git a/tests/app/notify_client/test_notification_client.py b/tests/app/notify_client/test_notification_client.py index 2eee3b2fd..6166334c7 100644 --- a/tests/app/notify_client/test_notification_client.py +++ b/tests/app/notify_client/test_notification_client.py @@ -4,7 +4,7 @@ from app.notify_client.notification_api_client import NotificationApiClient @pytest.mark.parametrize( - "arguments,expected_call", + ("arguments", "expected_call"), [ ({}, {"url": "/service/abcd1234/notifications", "params": {}}), ( @@ -63,7 +63,7 @@ def test_client_gets_notifications_for_service_and_job_by_page( @pytest.mark.parametrize( - "arguments,expected_call", + ("arguments", "expected_call"), [ ( {"to": "2028675309"}, diff --git a/tests/app/notify_client/test_organization_client.py b/tests/app/notify_client/test_organization_client.py index cb63cb3e2..ca7d6839c 100644 --- a/tests/app/notify_client/test_organization_client.py +++ b/tests/app/notify_client/test_organization_client.py @@ -7,12 +7,12 @@ from app import organizations_client @pytest.mark.parametrize( ( - "client_method," - "expected_cache_get_calls," - "cache_value," - "expected_api_calls," - "expected_cache_set_calls," - "expected_return_value," + "client_method", + "expected_cache_get_calls", + "cache_value", + "expected_api_calls", + "expected_cache_set_calls", + "expected_return_value", ), [ ( @@ -132,8 +132,8 @@ def test_deletes_domain_cache( @pytest.mark.parametrize( - "post_data, expected_cache_delete_calls", - ( + ("post_data", "expected_cache_delete_calls"), + [ ( {"foo": "bar"}, [ @@ -149,7 +149,7 @@ def test_deletes_domain_cache( call("domains"), ], ), - ), + ], ) def test_update_organization_when_not_updating_org_type( mocker, diff --git a/tests/app/notify_client/test_service_api_client.py b/tests/app/notify_client/test_service_api_client.py index 75d813d31..acffa3f8a 100644 --- a/tests/app/notify_client/test_service_api_client.py +++ b/tests/app/notify_client/test_service_api_client.py @@ -109,8 +109,8 @@ def test_get_precompiled_template(mocker): @pytest.mark.parametrize( - "template_data, extra_args, expected_count", - ( + ("template_data", "extra_args", "expected_count"), + [ ( [], {}, @@ -137,7 +137,7 @@ def test_get_precompiled_template(mocker): {"template_type": "email"}, 1, ), - ), + ], ) def test_client_returns_count_of_service_templates( notify_admin, @@ -159,13 +159,13 @@ def test_client_returns_count_of_service_templates( @pytest.mark.parametrize( ( - "client_method," - "extra_args," - "expected_cache_get_calls," - "cache_value," - "expected_api_calls," - "expected_cache_set_calls," - "expected_return_value," + "client_method", + "extra_args", + "expected_cache_get_calls", + "cache_value", + "expected_api_calls", + "expected_cache_set_calls", + "expected_return_value", ), [ ( @@ -374,7 +374,7 @@ def test_returns_value_from_cache( @pytest.mark.parametrize( - "client, method, extra_args, extra_kwargs", + ("client", "method", "extra_args", "extra_kwargs"), [ (service_api_client, "update_service", [SERVICE_ONE_ID], {"name": "foo"}), ( @@ -450,7 +450,7 @@ def test_deletes_service_cache( @pytest.mark.parametrize( - "method, extra_args, expected_cache_deletes", + ("method", "extra_args", "expected_cache_deletes"), [ ( "create_service_template", diff --git a/tests/app/notify_client/test_user_client.py b/tests/app/notify_client/test_user_client.py index c2f635626..4ed5fd881 100644 --- a/tests/app/notify_client/test_user_client.py +++ b/tests/app/notify_client/test_user_client.py @@ -141,11 +141,11 @@ def test_client_converts_admin_permissions_to_db_permissions_on_add_to_service( @pytest.mark.parametrize( ( - "expected_cache_get_calls," - "cache_value," - "expected_api_calls," - "expected_cache_set_calls," - "expected_return_value," + "expected_cache_get_calls", + "cache_value", + "expected_api_calls", + "expected_cache_set_calls", + "expected_return_value", ), [ ( @@ -192,8 +192,8 @@ def test_returns_value_from_cache( assert mock_redis_set.call_args_list == expected_cache_set_calls -@pytest.mark.parametrize( - "client, method, extra_args, extra_kwargs", +@pytest.mark.parametrize( # noqa: PT014 # Duplicate add_user_to_service has different params for each + ("client", "method", "extra_args", "extra_kwargs"), [ ( user_api_client, diff --git a/tests/app/s3_client/test_s3_logo_client.py b/tests/app/s3_client/test_s3_logo_client.py index c6ec7a6f2..fd640a002 100644 --- a/tests/app/s3_client/test_s3_logo_client.py +++ b/tests/app/s3_client/test_s3_logo_client.py @@ -134,7 +134,7 @@ def test_does_not_delete_non_temp_email_file(client_request, mocker): "app.s3_client.s3_logo_client.delete_s3_object" ) - with pytest.raises(ValueError) as error: + with pytest.raises(ValueError) as error: # noqa: PT011 # Requires more research. delete_email_temp_file(filename) assert mocked_delete_s3_object.called is False