Skip to content

Commit

Permalink
Use constants in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jimleroyer committed Oct 30, 2023
1 parent 74834f7 commit 9cc04c2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/app/notifications/test_process_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 9cc04c2

Please sign in to comment.