For the post_sms_response and post_email_response the reference property is always present but the value can be null.

Added a test for an empty reference.
Remove datetime format on the created_at attribute of a notification, it is not needed.
This commit is contained in:
Rebecca Law
2016-11-21 17:32:36 +00:00
parent 1345c94f4b
commit 46beece158
4 changed files with 17 additions and 13 deletions

View File

@@ -38,7 +38,7 @@ def post_sms_notification():
notification_type=SMS_TYPE,
api_key_id=api_user.id,
key_type=api_user.key_type,
reference=form['reference'])
reference=form.get('reference'))
send_notification_to_queue(notification, service.research_mode)
resp = create_post_sms_response_from_notification(notification,
@@ -65,7 +65,7 @@ def post_email_notification():
notification_type=EMAIL_TYPE,
api_key_id=api_user.id,
key_type=api_user.key_type,
reference=form['reference'])
reference=form.get('reference'))
send_notification_to_queue(notification, service.research_mode)