add reply-to-text to send notification to service users

This commit is contained in:
venusbb
2017-11-27 14:05:04 +00:00
parent a97d946d2d
commit e1175542b7
2 changed files with 4 additions and 2 deletions

View File

@@ -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)

View File

@@ -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(