From 9cc04c23fd6d6aea188f6fdd888573fe3aa1e646 Mon Sep 17 00:00:00 2001 From: Jimmy Royer Date: Mon, 30 Oct 2023 11:58:43 -0400 Subject: [PATCH] Use constants in tests --- .../app/notifications/test_process_notification.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/app/notifications/test_process_notification.py b/tests/app/notifications/test_process_notification.py index 20b0a6962f..d9fa7bb07b 100644 --- a/tests/app/notifications/test_process_notification.py +++ b/tests/app/notifications/test_process_notification.py @@ -26,7 +26,7 @@ ScheduledNotification, Template, ) -from app.notifications import RETRY_POLICY_DEFAULT +from app.notifications import RETRY_POLICY_DEFAULT, RETRY_POLICY_HIGH from app.notifications.process_notifications import ( build_delivery_task_params, choose_queue, @@ -1100,12 +1100,12 @@ def test_db_save_and_send_notification_throws_exception_deletes_notification( @pytest.mark.parametrize( ("notification_type, process_type, expected_retry, expected_retry_period"), [ - (EMAIL_TYPE, BULK, 48, 300), - (EMAIL_TYPE, NORMAL, 48, 300), - (EMAIL_TYPE, PRIORITY, 48, 300), - (SMS_TYPE, BULK, 48, 300), - (SMS_TYPE, NORMAL, 48, 300), - (SMS_TYPE, PRIORITY, 48, 25), + (EMAIL_TYPE, BULK, RETRY_POLICY_DEFAULT["max_retries"], RETRY_POLICY_DEFAULT["interval_step"]), + (EMAIL_TYPE, NORMAL, RETRY_POLICY_DEFAULT["max_retries"], RETRY_POLICY_DEFAULT["interval_step"]), + (EMAIL_TYPE, PRIORITY, RETRY_POLICY_DEFAULT["max_retries"], RETRY_POLICY_DEFAULT["interval_step"]), + (SMS_TYPE, BULK, RETRY_POLICY_DEFAULT["max_retries"], RETRY_POLICY_DEFAULT["interval_step"]), + (SMS_TYPE, NORMAL, RETRY_POLICY_DEFAULT["max_retries"], RETRY_POLICY_DEFAULT["interval_step"]), + (SMS_TYPE, PRIORITY, RETRY_POLICY_HIGH["max_retries"], RETRY_POLICY_HIGH["interval_step"]), ], ) def test_delivery_task_parameters(self, notification_type, process_type, expected_retry, expected_retry_period):