mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-10 10:03:38 -04:00
Remove custom error message from personalisation validation
There's no longer a single err msg that fits all problems with personalisation - since letters expect specific fields there
This commit is contained in:
@@ -51,11 +51,18 @@ valid_json_post_args = {
|
||||
}
|
||||
|
||||
invalid_json_post_args = [
|
||||
({"id": "invalid_uuid", "personalisation": {"key": "value"}}, ["id is not a valid UUID"]),
|
||||
({"id": str(uuid.uuid4()), "personalisation": "invalid_personalisation"},
|
||||
["personalisation should contain key value pairs"]),
|
||||
({"personalisation": "invalid_personalisation"},
|
||||
["id is a required property", "personalisation should contain key value pairs"])
|
||||
(
|
||||
{"id": "invalid_uuid", "personalisation": {"key": "value"}},
|
||||
["id is not a valid UUID"]
|
||||
),
|
||||
(
|
||||
{"id": str(uuid.uuid4()), "personalisation": ['a', 'b']},
|
||||
["personalisation [a, b] is not of type object"]
|
||||
),
|
||||
(
|
||||
{"personalisation": "invalid_personalisation"},
|
||||
["id is a required property", "personalisation invalid_personalisation is not of type object"]
|
||||
)
|
||||
]
|
||||
|
||||
valid_json_post_response = {
|
||||
|
||||
Reference in New Issue
Block a user