Improvements to the tests.

Update AuthError with a to_dict_v2 method.
This commit is contained in:
Rebecca Law
2016-11-01 10:33:34 +00:00
parent a358f3cb3a
commit 482d10545b
8 changed files with 58 additions and 46 deletions

View File

@@ -56,12 +56,13 @@ post_sms_response = {
}
def create_post_sms_response_from_notification(notification, content):
def create_post_sms_response_from_notification(notification, body, from_number, url_root):
return {"id": notification.id,
"reference": None, # not yet implemented
"content": content,
"uri": "v2/notifications/{}".format(notification.id),
"content": {'body': body,
'from_number': from_number},
"uri": "{}/v2/notifications/{}".format(url_root, str(notification.id)),
"template": {"id": notification.template_id,
"version": notification.template_version,
"uri": "v2/templates/{}".format(notification.template_id)}
"uri": "{}/v2/templates/{}".format(url_root, str(notification.template_id))}
}