more tests

This commit is contained in:
Kenneth Kehl
2023-08-11 11:47:57 -07:00
parent 318bb01392
commit 85604e5394
10 changed files with 189 additions and 30 deletions

View File

@@ -2,6 +2,8 @@ import pytest
from flask import url_for
from sqlalchemy.exc import DataError
from app.v2.errors import ValidationError
@pytest.fixture(scope='function')
def app_for_test():
@@ -97,6 +99,9 @@ def test_validation_error(app_for_test):
'message': "phone_number is a required property"} in error['errors']
assert {'error': 'ValidationError',
'message': "template_id is not a valid UUID"} in error['errors']
ve = ValidationError("phone_number is a required property")
assert ve.message == "Your notification has failed validation"
assert ve.status_code == 400
def test_data_errors(app_for_test):