From 54e9768d077cf24c6d8ba06c26fa56547f493080 Mon Sep 17 00:00:00 2001 From: John Davis Date: Fri, 17 Feb 2023 01:11:43 -0500 Subject: [PATCH] Fix unit test: process no longer in session We don't keep the process in the session --- test/unit/app/queue_worker/test_database_heartbeat.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/unit/app/queue_worker/test_database_heartbeat.py b/test/unit/app/queue_worker/test_database_heartbeat.py index ff58df5fcb94..4e8ec19deb06 100644 --- a/test/unit/app/queue_worker/test_database_heartbeat.py +++ b/test/unit/app/queue_worker/test_database_heartbeat.py @@ -46,7 +46,9 @@ def one_active_process(): update_time = process.update_time def process_updated(): - heartbeat_app.model.context.refresh(process) + session = heartbeat_app.model.context() + session.add(process) + session.refresh(process) next_update_time = process.update_time assert update_time < next_update_time