From 26768d0f2d5462a19345e3d5b8602ec829e47151 Mon Sep 17 00:00:00 2001 From: Stephen Astels Date: Thu, 23 May 2024 16:01:00 -0400 Subject: [PATCH] use correct callback generator --- app/celery/research_mode_tasks.py | 4 ++-- tests/app/celery/test_research_mode_tasks.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/celery/research_mode_tasks.py b/app/celery/research_mode_tasks.py index eb0944b561..c0543f75cd 100644 --- a/app/celery/research_mode_tasks.py +++ b/app/celery/research_mode_tasks.py @@ -6,8 +6,8 @@ from app import create_uuid, notify_celery from app.aws.mocks import ( + pinpoint_delivered_callback, pinpoint_failed_callback, - pinpoint_successful_callback, ses_hard_bounce_callback, ses_notification_callback, ses_soft_bounce_callback, @@ -87,7 +87,7 @@ def aws_pinpoint_callback(notification_id, to): "Phone carrier is currently unreachable/unavailable", notification_id, destination=to, timestamp=timestamp ) else: - return pinpoint_successful_callback(notification_id, destination=to, timestamp=timestamp) + return pinpoint_delivered_callback(notification_id, destination=to, timestamp=timestamp) @notify_celery.task( diff --git a/tests/app/celery/test_research_mode_tasks.py b/tests/app/celery/test_research_mode_tasks.py index 7c2f4bda1c..b667132f4b 100644 --- a/tests/app/celery/test_research_mode_tasks.py +++ b/tests/app/celery/test_research_mode_tasks.py @@ -8,8 +8,8 @@ from freezegun import freeze_time from app.aws.mocks import ( + pinpoint_delivered_callback, pinpoint_failed_callback, - pinpoint_successful_callback, ses_notification_callback, sns_failed_callback, sns_success_callback, @@ -55,8 +55,8 @@ def test_make_sns_success_callback(notify_api, mocker, phone_number, sns_callbac @pytest.mark.parametrize( "phone_number, pinpoint_callback, pinpoint_callback_args", [ - ("+15149301630", pinpoint_successful_callback, {}), - ("+15149301631", pinpoint_successful_callback, {}), + ("+15149301630", pinpoint_delivered_callback, {}), + ("+15149301631", pinpoint_delivered_callback, {}), ("+15149301632", pinpoint_failed_callback, {"provider_response": "Phone is currently unreachable/unavailable"}), ("+15149301633", pinpoint_failed_callback, {"provider_response": "Phone carrier is currently unreachable/unavailable"}), ],