Skip to content

Commit

Permalink
use correct callback generator
Browse files Browse the repository at this point in the history
  • Loading branch information
sastels committed May 23, 2024
1 parent c5dae4d commit 26768d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/celery/research_mode_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions tests/app/celery/test_research_mode_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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"}),
],
Expand Down

0 comments on commit 26768d0

Please sign in to comment.