mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 18:31:13 -05:00
Change endpoint responses where there are marshalling, unmarshalling
or param errors to raise invalid data exception. That will cause those responses to be handled in by errors.py, which will log the errors. Set most of schemas to strict mode so that marshmallow will raise exception rather than checking for errors in return tuple from load. Added handler to errors.py for marshmallow validation errors.
This commit is contained in:
@@ -267,6 +267,6 @@ def test_get_template_versions(sample_template):
|
||||
assert x.content == 'new version'
|
||||
else:
|
||||
assert x.content == original_content
|
||||
from app.schemas import (template_history_schema)
|
||||
from app.schemas import template_history_schema
|
||||
v = template_history_schema.load(versions, many=True)
|
||||
assert v.__len__() == 2
|
||||
|
||||
Reference in New Issue
Block a user