mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 01:11:38 -05:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user