From e1175542b70111084c199c590efd9abe74592460 Mon Sep 17 00:00:00 2001 From: venusbb Date: Mon, 27 Nov 2017 14:05:04 +0000 Subject: [PATCH] add reply-to-text to send notification to service users --- app/service/sender.py | 3 ++- tests/app/service/test_sender.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/service/sender.py b/app/service/sender.py index 4919a93bf..e87213a7b 100644 --- a/app/service/sender.py +++ b/app/service/sender.py @@ -23,7 +23,8 @@ def send_notification_to_service_users(service_id, template_id, personalisation= personalisation=personalisation, notification_type=template.template_type, api_key_id=None, - key_type=KEY_TYPE_NORMAL + key_type=KEY_TYPE_NORMAL, + reply_to_text=notify_service.get_default_reply_to_email_address() ) send_notification_to_queue(notification, False, queue=QueueNames.NOTIFY) diff --git a/tests/app/service/test_sender.py b/tests/app/service/test_sender.py index ca042cc67..7b1ab1876 100644 --- a/tests/app/service/test_sender.py +++ b/tests/app/service/test_sender.py @@ -26,7 +26,7 @@ def test_send_notification_to_service_users_persists_notifications_correctly( ): mocker.patch('app.service.sender.send_notification_to_queue') - create_notify_service(notify_db, notify_db_session) + notify_service, user = create_notify_service(notify_db, notify_db_session) service = create_sample_service(notify_db, notify_db_session, user=sample_user) template = create_template(service, template_type=notification_type) send_notification_to_service_users(service_id=service.id, template_id=template.id) @@ -40,6 +40,7 @@ def test_send_notification_to_service_users_persists_notifications_correctly( assert notification.template.id == template.id assert notification.template.template_type == notification_type assert notification.notification_type == notification_type + assert notification.reply_to_text == notify_service.get_default_reply_to_email_address() def test_send_notification_to_service_users_sends_to_queue(