Cleaning & debugging

Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
Cliff Hill
2024-02-27 10:24:20 -05:00
parent 75cec3a635
commit c407d61d60
8 changed files with 62 additions and 23 deletions

View File

@@ -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}]"
)