add test for GET /notification

simple schema with oneOf [email, sms].
also fixed error where ref'd schemas weren't being picked up
This commit is contained in:
Leo Hemsted
2016-08-30 19:07:46 +01:00
parent 1b7b4a2ccb
commit cb0491cbff
7 changed files with 246 additions and 213 deletions

View File

@@ -27,3 +27,10 @@ def test_get_email_contract(client, sample_email_notification):
response = client.get('/notifications/{}'.format(sample_email_notification.id), headers=[auth_header])
validate(response.get_data(as_text=True), './GET_notification_return_email.json')
def test_get_notifications_contract(client, sample_notification, sample_email_notification):
auth_header = create_authorization_header(service_id=sample_notification.service_id)
response = client.get('/notifications', headers=[auth_header])
validate(response.get_data(as_text=True), './GET_notifications_return.json')