From 23f894581cce419bacd9285fce70ede290d54b0d Mon Sep 17 00:00:00 2001 From: Carlo Costino Date: Thu, 7 Sep 2023 17:52:38 -0400 Subject: [PATCH] More test cleanup Signed-off-by: Carlo Costino --- tests/app/s3_client/test_s3_logo_client.py | 4 ++-- tests/app/test_cloudfoundry_config.py | 2 +- tests/app/test_navigation.py | 4 ++-- tests/app/test_statistics_utils.py | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/app/s3_client/test_s3_logo_client.py b/tests/app/s3_client/test_s3_logo_client.py index 2041d54c1..c6ec7a6f2 100644 --- a/tests/app/s3_client/test_s3_logo_client.py +++ b/tests/app/s3_client/test_s3_logo_client.py @@ -19,14 +19,14 @@ svg_filename = "test.svg" upload_id = "test_uuid" -@pytest.fixture +@pytest.fixture() def upload_filename(fake_uuid): return EMAIL_LOGO_LOCATION_STRUCTURE.format( temp=TEMP_TAG.format(user_id=fake_uuid), unique_id=upload_id, filename=filename ) -@pytest.fixture +@pytest.fixture() def bucket_credentials(notify_admin): return notify_admin.config["LOGO_UPLOAD_BUCKET"] diff --git a/tests/app/test_cloudfoundry_config.py b/tests/app/test_cloudfoundry_config.py index 433f2c73e..6eea0dd95 100644 --- a/tests/app/test_cloudfoundry_config.py +++ b/tests/app/test_cloudfoundry_config.py @@ -13,7 +13,7 @@ bucket_credentials = { } -@pytest.fixture +@pytest.fixture() def vcap_services(): return { "aws-elasticache-redis": [{"credentials": {"uri": "redis://xxx:6379"}}], diff --git a/tests/app/test_navigation.py b/tests/app/test_navigation.py index 59cb0f8f9..e24b4f145 100644 --- a/tests/app/test_navigation.py +++ b/tests/app/test_navigation.py @@ -352,7 +352,7 @@ def test_raises_on_invalid_navigation_item(client_request, navigation_instance): @pytest.mark.parametrize( - "endpoint, selected_nav_item", + ("endpoint", "selected_nav_item"), [ ("main.choose_template", "Send messages"), ("main.manage_users", "Team members"), @@ -392,7 +392,7 @@ def test_a_page_should_nave_selected_navigation_item( @pytest.mark.parametrize( - "endpoint, selected_nav_item", + ("endpoint", "selected_nav_item"), [ ("main.organization_dashboard", "Usage"), ("main.manage_org_users", "Team members"), diff --git a/tests/app/test_statistics_utils.py b/tests/app/test_statistics_utils.py index 1e2b585ee..91c09eb62 100644 --- a/tests/app/test_statistics_utils.py +++ b/tests/app/test_statistics_utils.py @@ -53,7 +53,7 @@ def test_sum_of_statistics_sums_inputs(): @pytest.mark.parametrize( - "emails_failed,emails_requested,expected_failure_rate", + ("emails_failed", "emails_requested", "expected_failure_rate"), [(0, 0, "0"), (0, 1, "0.0"), (1, 3, "33.3")], ) def test_add_rates_sets_email_failure_rate( @@ -72,7 +72,7 @@ def test_add_rates_sets_email_failure_rate( @pytest.mark.parametrize( - "sms_failed,sms_requested,expected_failure_rate", + ("sms_failed", "sms_requested", "expected_failure_rate"), [(0, 0, "0"), (0, 1, "0.0"), (1, 3, "33.3")], ) def test_add_rates_sets_sms_failure_rate( @@ -121,7 +121,7 @@ def test_service_statistics_by_state(): @pytest.mark.parametrize( - "failed, delivered, expected_failure_rate", + ("failed", "delivered", "expected_failure_rate"), [(0, 0, 0), (0, 1, 0), (1, 1, 50), (1, 0, 100), (1, 4, 20)], ) def test_add_rate_to_job_calculates_rate(failed, delivered, expected_failure_rate):