ensure /notifications rather than service/:id/notifications in tests

for content merging
This commit is contained in:
Leo Hemsted
2016-07-26 14:49:51 +01:00
parent c81b30dba1
commit 91393bdb0d
2 changed files with 3 additions and 5 deletions

View File

@@ -296,9 +296,6 @@ def test_get_all_notifications_for_job_in_order_of_job_number(notify_api,
assert resp['notifications'][2]['job_row_number'] == notification_3.job_row_number
assert response.status_code == 200
# make sure we're not loading templates
assert 'template' not in resp['notifications'][0]
@pytest.mark.parametrize(
"expected_notification_count, status_args",

View File

@@ -13,6 +13,7 @@ from tests import create_authorization_header
from tests.app.conftest import sample_notification as create_sample_notification
from notifications_utils.template import NeededByTemplateError
def test_get_sms_notification_by_id(notify_api, sample_notification):
with notify_api.test_request_context():
with notify_api.test_client() as client:
@@ -602,10 +603,10 @@ def test_get_notifications_for_service_returns_merged_template_content(notify_ap
with notify_api.test_request_context():
with notify_api.test_client() as client:
auth_header = create_authorization_header()
auth_header = create_authorization_header(service_id=sample_template_with_placeholders.service_id)
response = client.get(
path='/service/{}/notifications'.format(sample_template_with_placeholders.service.id),
path='/notifications',
headers=[auth_header])
assert response.status_code == 200