mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 14:31:57 -05:00
@@ -127,9 +127,15 @@ def test_create_service_data_retention_returns_400_when_notification_type_is_inv
|
||||
json_resp = json.loads(response.get_data(as_text=True))
|
||||
assert response.status_code == 400
|
||||
assert json_resp["errors"][0]["error"] == "ValidationError"
|
||||
type_str = ", ".join(
|
||||
[
|
||||
f"<{type(e).__name__}.{e.name}: {e.value}>"
|
||||
for e in (NotificationType.SMS, NotificationType.EMAIL)
|
||||
]
|
||||
)
|
||||
assert (
|
||||
json_resp["errors"][0]["message"]
|
||||
== f"notification_type unknown is not one of [{', '.join([f'<{type(e).__name__}.{e.name}: {e.value}>'for e in (NotificationType.SMS, NotificationType.EMAIL)])}]"
|
||||
== f"notification_type unknown is not one of [{type_str}]"
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user