From 53f394895c5e5599b1545d0ce1ba5ab2078b843e Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Mon, 18 Nov 2024 14:30:22 -0800 Subject: [PATCH] fix --- tests/app/dao/test_fact_processing_time_dao.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/app/dao/test_fact_processing_time_dao.py b/tests/app/dao/test_fact_processing_time_dao.py index bc57163ba..606a93cc1 100644 --- a/tests/app/dao/test_fact_processing_time_dao.py +++ b/tests/app/dao/test_fact_processing_time_dao.py @@ -1,9 +1,7 @@ from datetime import datetime from freezegun import freeze_time -from sqlalchemy import select -from app import db from app.dao import fact_processing_time_dao from app.dao.fact_processing_time_dao import ( get_processing_time_percentage_for_date_range, @@ -21,7 +19,7 @@ def test_insert_update_processing_time(notify_db_session): fact_processing_time_dao.insert_update_processing_time(data) - result = db.session.execute(select(FactProcessingTime)).all() + result = db.session.execute(select(FactProcessingTime)).scalars().all() assert len(result) == 1 assert result[0].local_date == datetime(2021, 2, 22).date() @@ -38,7 +36,7 @@ def test_insert_update_processing_time(notify_db_session): with freeze_time("2021-02-23 13:23:33"): fact_processing_time_dao.insert_update_processing_time(data) - result = db.session.execute(select(FactProcessingTime)).all() + result = FactProcessingTime.query.all() assert len(result) == 1 assert result[0].local_date == datetime(2021, 2, 22).date()