mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-09 17:45:41 -04:00
ensure /notifications rather than service/:id/notifications in tests
for content merging
This commit is contained in:
@@ -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 resp['notifications'][2]['job_row_number'] == notification_3.job_row_number
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
|
|
||||||
# make sure we're not loading templates
|
|
||||||
assert 'template' not in resp['notifications'][0]
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"expected_notification_count, status_args",
|
"expected_notification_count, status_args",
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ from tests import create_authorization_header
|
|||||||
from tests.app.conftest import sample_notification as create_sample_notification
|
from tests.app.conftest import sample_notification as create_sample_notification
|
||||||
from notifications_utils.template import NeededByTemplateError
|
from notifications_utils.template import NeededByTemplateError
|
||||||
|
|
||||||
|
|
||||||
def test_get_sms_notification_by_id(notify_api, sample_notification):
|
def test_get_sms_notification_by_id(notify_api, sample_notification):
|
||||||
with notify_api.test_request_context():
|
with notify_api.test_request_context():
|
||||||
with notify_api.test_client() as client:
|
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_request_context():
|
||||||
with notify_api.test_client() as client:
|
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(
|
response = client.get(
|
||||||
path='/service/{}/notifications'.format(sample_template_with_placeholders.service.id),
|
path='/notifications',
|
||||||
headers=[auth_header])
|
headers=[auth_header])
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user