From 4302610d259a87d46598215b6d0187060e57ba14 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Thu, 10 Oct 2024 15:08:00 -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 ca7fd67ba..df642e173 100644 --- a/tests/app/dao/test_services_dao.py +++ b/tests/app/dao/test_services_dao.py @@ -96,7 +96,7 @@ def _get_service_query_count(): def _get_service_history_query_count(): - stmt = select(Service.get_history_model()) + stmt = select(func.count(Service.get_history_model().id)) return db.session.execute(stmt).scalar() or 0 @@ -905,7 +905,7 @@ def test_delete_service_and_associated_objects(notify_db_session): assert db.session.execute(stmt).scalar() is None # the organization hasn't been deleted - stmt = select(Organization) + stmt = select(func.count(Organization.id)) assert db.session.execute(stmt).scalar() == 1