Add contract test for 'v2' email notification

We don't have a way of creating letter notifications just yet, so
this is all we can test.
This commit is contained in:
Paul Craig
2016-11-22 12:00:48 +00:00
parent 7ae427c4ef
commit ebfac180c0

View File

@@ -16,13 +16,20 @@ def _get_notification(client, notification, url):
return client.get(url, headers=[auth_header])
def test_get_v2_notification(client, sample_notification):
def test_get_v2_sms_contract(client, sample_notification):
response_json = return_json_from_response(_get_notification(
client, sample_notification, '/v2/notifications/{}'.format(sample_notification.id)
))
validate(response_json, get_notification_response)
def test_get_v2_email_contract(client, sample_email_notification):
response_json = return_json_from_response(_get_notification(
client, sample_email_notification, '/v2/notifications/{}'.format(sample_email_notification.id)
))
validate(response_json, get_notification_response)
def test_get_api_sms_contract(client, sample_notification):
response_json = return_json_from_response(_get_notification(
client, sample_notification, '/notifications/{}'.format(sample_notification.id)