mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 06:21:50 -05:00
Fixed test_get_notification.py tests
This commit is contained in:
@@ -24,8 +24,6 @@ def _get_notification(client, notification, url):
|
||||
|
||||
|
||||
# v0
|
||||
|
||||
|
||||
def test_get_api_sms_contract(client, sample_notification):
|
||||
response_json = return_json_from_response(
|
||||
_get_notification(
|
||||
@@ -37,18 +35,6 @@ def test_get_api_sms_contract(client, sample_notification):
|
||||
validate_v0(response_json, "GET_notification_return_sms.json")
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="Update to fetch email from s3")
|
||||
def test_get_api_email_contract(client, sample_email_notification):
|
||||
response_json = return_json_from_response(
|
||||
_get_notification(
|
||||
client,
|
||||
sample_email_notification,
|
||||
"/notifications/{}".format(sample_email_notification.id),
|
||||
)
|
||||
)
|
||||
validate_v0(response_json, "GET_notification_return_email.json")
|
||||
|
||||
|
||||
def test_get_job_sms_contract(client, sample_notification):
|
||||
response_json = return_json_from_response(
|
||||
_get_notification(
|
||||
@@ -60,22 +46,12 @@ def test_get_job_sms_contract(client, sample_notification):
|
||||
validate_v0(response_json, "GET_notification_return_sms.json")
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="Update to fetch email from s3")
|
||||
def test_get_job_email_contract(client, sample_email_notification):
|
||||
response_json = return_json_from_response(
|
||||
_get_notification(
|
||||
client,
|
||||
sample_email_notification,
|
||||
"/notifications/{}".format(sample_email_notification.id),
|
||||
)
|
||||
)
|
||||
validate_v0(response_json, "GET_notification_return_email.json")
|
||||
|
||||
|
||||
def test_get_notifications_contract(
|
||||
client, sample_notification, sample_email_notification
|
||||
):
|
||||
def test_get_notifications_contract(client, sample_notification, sample_email_notification):
|
||||
response_json = return_json_from_response(
|
||||
_get_notification(client, sample_notification, "/notifications")
|
||||
)
|
||||
notifications = response_json["notifications"]
|
||||
assert notifications, "No notifications returned"
|
||||
assert notifications[0]["template"]["template_type"] == "sms"
|
||||
validate_v0(response_json, "GET_notifications_return.json")
|
||||
|
||||
@@ -48,7 +48,7 @@ def test_notification_schema_adds_api_key_name(sample_notification):
|
||||
"notification_with_template_schema",
|
||||
"notification_schema",
|
||||
"notification_with_template_schema",
|
||||
"notification_with_personalisation_schema",
|
||||
"public_notification_response_schema",
|
||||
],
|
||||
)
|
||||
def test_notification_schema_has_correct_status(sample_notification, schema_name):
|
||||
|
||||
Reference in New Issue
Block a user