From dd8372a5729780aeb5e9c2355693ee3cb153950c Mon Sep 17 00:00:00 2001 From: Adam Shimali Date: Fri, 17 Jun 2016 10:15:57 +0100 Subject: [PATCH] Updated for git comments --- .../app/notifications/test_notification_statistics_rest.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/app/notifications/test_notification_statistics_rest.py b/tests/app/notifications/test_notification_statistics_rest.py index 69ed1ff32..d298aa7c5 100644 --- a/tests/app/notifications/test_notification_statistics_rest.py +++ b/tests/app/notifications/test_notification_statistics_rest.py @@ -191,6 +191,9 @@ def test_get_notification_statistics_for_specific_day_returns_400_for_incorrect_ auth_header = create_authorization_header(service_id=sample_template.service_id) response = client.get(path, headers=[auth_header]) assert response.status_code == 400 + resp_json = json.loads(response.get_data(as_text=True)) + assert resp_json['result'] == 'error' + assert resp_json['message'] == 'Invalid date 01-01-2016' another_dodgy_date = 'fish' path = '/service/{}/notifications-statistics/day/{}'.format( @@ -199,3 +202,6 @@ def test_get_notification_statistics_for_specific_day_returns_400_for_incorrect_ response = client.get(path, headers=[auth_header]) assert response.status_code == 400 + resp_json = json.loads(response.get_data(as_text=True)) + assert resp_json['result'] == 'error' + assert resp_json['message'] == 'Invalid date fish'