mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-21 07:51:13 -05:00
Update error messages after SQLAlchemy version update
This commit is contained in:
@@ -79,7 +79,7 @@ def test_get_unknown_invited_user_returns_none(notify_db, notify_db_session, sam
|
|||||||
|
|
||||||
with pytest.raises(NoResultFound) as e:
|
with pytest.raises(NoResultFound) as e:
|
||||||
get_invited_user_by_service_and_id(sample_service.id, unknown_id)
|
get_invited_user_by_service_and_id(sample_service.id, unknown_id)
|
||||||
assert 'No row was found for one()' in str(e.value)
|
assert 'No row was found when one was required' in str(e.value)
|
||||||
|
|
||||||
|
|
||||||
def test_get_invited_users_for_service(notify_db, notify_db_session, sample_service):
|
def test_get_invited_users_for_service(notify_db, notify_db_session, sample_service):
|
||||||
|
|||||||
@@ -509,7 +509,7 @@ def test_dao_fetch_live_services_data(sample_user):
|
|||||||
def test_get_service_by_id_returns_none_if_no_service(notify_db):
|
def test_get_service_by_id_returns_none_if_no_service(notify_db):
|
||||||
with pytest.raises(NoResultFound) as e:
|
with pytest.raises(NoResultFound) as e:
|
||||||
dao_fetch_service_by_id(str(uuid.uuid4()))
|
dao_fetch_service_by_id(str(uuid.uuid4()))
|
||||||
assert 'No row was found for one()' in str(e.value)
|
assert 'No row was found when one was required' in str(e.value)
|
||||||
|
|
||||||
|
|
||||||
def test_get_service_by_id_returns_service(notify_db_session):
|
def test_get_service_by_id_returns_service(notify_db_session):
|
||||||
|
|||||||
@@ -372,7 +372,7 @@ def test_get_template_version_returns_none_for_hidden_templates(sample_service):
|
|||||||
def test_get_template_by_id_and_service_returns_none_if_no_template(sample_service, fake_uuid):
|
def test_get_template_by_id_and_service_returns_none_if_no_template(sample_service, fake_uuid):
|
||||||
with pytest.raises(NoResultFound) as e:
|
with pytest.raises(NoResultFound) as e:
|
||||||
dao_get_template_by_id_and_service_id(template_id=fake_uuid, service_id=sample_service.id)
|
dao_get_template_by_id_and_service_id(template_id=fake_uuid, service_id=sample_service.id)
|
||||||
assert 'No row was found for one' in str(e.value)
|
assert 'No row was found when one was required' in str(e.value)
|
||||||
|
|
||||||
|
|
||||||
def test_create_template_creates_a_history_record_with_current_data(sample_service, sample_user):
|
def test_create_template_creates_a_history_record_with_current_data(sample_service, sample_user):
|
||||||
|
|||||||
Reference in New Issue
Block a user