From fa5af8e02cea56cb7c970ad2e7aa33a6bfe7a40b Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Fri, 11 Oct 2024 07:40:29 -0700 Subject: [PATCH] try to fix test code --- tests/app/dao/test_services_dao.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/app/dao/test_services_dao.py b/tests/app/dao/test_services_dao.py index 8c0b5e452..61fe99419 100644 --- a/tests/app/dao/test_services_dao.py +++ b/tests/app/dao/test_services_dao.py @@ -710,7 +710,7 @@ def test_create_service_creates_a_history_record_with_current_data(notify_db_ses service_from_db = _get_first_service() stmt = select(Service.get_history_model()) - service_history = db.session.execute(stmt).first() + service_history = db.session.execute(stmt).scalars().first() assert service_from_db.id == service_history.id assert service_from_db.name == service_history.name @@ -749,7 +749,7 @@ def test_update_service_creates_a_history_record_with_current_data(notify_db_ses stmt = select(Service.get_history_model()).filter_by(name="service_name") assert db.session.execute(stmt).scalars().one().version == 1 stmt = select(Service.get_history_model()).filter_by(name="updated_service_name") - assert db.session.execute(stmt).one().version == 2 + assert db.session.execute(stmt).scalars().one().version == 2 def test_update_service_permission_creates_a_history_record_with_current_data(