The body of the content in the response to a POST v2/notifications was not replacing the placeholders.

This PR fixes that and adds a test for it.

I am confused as to why I had to change the test_validators test that is checking if the mock is called.
Why did this code pass on preview?
This commit is contained in:
Rebecca Law
2016-11-28 15:49:29 +00:00
parent 1b846f3e74
commit 57a8f8d7fa
3 changed files with 24 additions and 23 deletions

View File

@@ -42,7 +42,7 @@ def post_sms_notification():
send_notification_to_queue(notification, service.research_mode)
resp = create_post_sms_response_from_notification(notification,
template_with_content.content,
template_with_content.replaced,
service.sms_sender,
request.url_root)
return jsonify(resp), 201
@@ -70,7 +70,7 @@ def post_email_notification():
send_notification_to_queue(notification, service.research_mode)
resp = create_post_email_response_from_notification(notification=notification,
content=template_with_content.content,
content=template_with_content.replaced,
subject=template_with_content.subject,
email_from=service.email_from,
url_root=request.url_root)