diff --git a/app/service/sender.py b/app/service/sender.py index 8e03d5964..484126d0f 100644 --- a/app/service/sender.py +++ b/app/service/sender.py @@ -52,9 +52,11 @@ def send_notification_to_service_users( json.dumps(personalisation), ex=24 * 60 * 60, ) + print(hilite("GOT PAST FIRST SET")) redis_store.set( f"email-recipient-{notification.id}", notification.to, ex=24 * 60 * 60 ) + print(hilite("GOT PAST SECOND SET")) send_notification_to_queue(notification, queue=QueueNames.NOTIFY) return notification diff --git a/tests/app/service/test_sender.py b/tests/app/service/test_sender.py index b37e5468c..3cf60588d 100644 --- a/tests/app/service/test_sender.py +++ b/tests/app/service/test_sender.py @@ -87,9 +87,7 @@ def test_send_notification_to_service_users_sends_to_active_users_only( notify_service, mocker ): mocker.patch("app.service.sender.send_notification_to_queue") - mocker.patch( - "app.service.sender.redis_store", - ) + mocker.patch("app.service.sender.redis_store", autospec=True) first_active_user = create_user(email="foo@bar.com", state="active") second_active_user = create_user(email="foo1@bar.com", state="active")