mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-21 16:01:15 -05:00
Change validation error message to a string from a dict.
This commit is contained in:
@@ -88,13 +88,14 @@ def test_validation_error(app_for_test):
|
||||
response = client.get(url_for('v2_under_test.raising_validation_error'))
|
||||
assert response.status_code == 400
|
||||
error = json.loads(response.get_data(as_text=True))
|
||||
print(error)
|
||||
assert len(error.keys()) == 2
|
||||
assert error['status_code'] == 400
|
||||
assert len(error['errors']) == 2
|
||||
assert {'error': 'ValidationError',
|
||||
'message': {'phone_number': 'is a required property'}} in error['errors']
|
||||
'message': "phone_number is a required property"} in error['errors']
|
||||
assert {'error': 'ValidationError',
|
||||
'message': {'template_id': 'not a valid UUID'}} in error['errors']
|
||||
'message': "template_id is not a valid UUID"} in error['errors']
|
||||
|
||||
|
||||
def test_data_errors(app_for_test):
|
||||
|
||||
Reference in New Issue
Block a user