This commit is contained in:
Kenneth Kehl
2024-11-18 10:35:54 -08:00
parent 2c3c107008
commit ce42803817
6 changed files with 18 additions and 7 deletions

View File

@@ -20,5 +20,5 @@ def test_create_event(notify_db_session):
stmt = select(func.count()).select_from(Event)
count = db.session.execute(stmt).scalar() or 0
assert count == 1
event_from_db = Event.query.first()
event_from_db = db.session.execute(select(Event)).scalars().first()
assert event == event_from_db

View File

@@ -1,6 +1,7 @@
import uuid
import pytest
from sqlalchemy import select
from sqlalchemy.exc import SQLAlchemyError
from app import db
@@ -207,7 +208,7 @@ def test_update_reply_to_email_address_set_updated_to_default(sample_service):
is_default=True,
)
results = ServiceEmailReplyTo.query.all()
results = db.session.execute(select(ServiceEmailReplyTo)).scalars().all()
assert len(results) == 2
for x in results:
if x.email_address == "change_address@email.com":