From a3a5abc521f351985181ac987af6820a21d751ae Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Mon, 21 Oct 2024 08:15:07 -0700 Subject: [PATCH] fix test code --- tests/app/dao/test_inbound_sms_dao.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/app/dao/test_inbound_sms_dao.py b/tests/app/dao/test_inbound_sms_dao.py index 3bc590123..39cdb2f53 100644 --- a/tests/app/dao/test_inbound_sms_dao.py +++ b/tests/app/dao/test_inbound_sms_dao.py @@ -143,7 +143,7 @@ def test_should_delete_inbound_sms_according_to_data_retention(notify_db_session deleted_count = delete_inbound_sms_older_than_retention() stmt = select(InboundSmsHistory) - history = db.session.execute(stmt).all() + history = db.session.execute(stmt).scalars().all() assert len(history) == 7 # four deleted for the 3-day service, two for the default seven days one, one for the 30 day @@ -174,7 +174,7 @@ def test_insert_into_inbound_sms_history_when_deleting_inbound_sms(sample_servic delete_inbound_sms_older_than_retention() stmt = select(InboundSmsHistory) - history = db.session.execute(stmt).all() + history = db.session.execute(stmt).scalars().all() assert len(history) == 1 for key_name in [ @@ -230,7 +230,7 @@ def test_delete_inbound_sms_older_than_retention_does_nothing_when_database_conf delete_inbound_sms_older_than_retention() stmt = select(InboundSmsHistory) - history = db.session.execute(stmt).all() + history = db.session.execute(stmt).scalars().all() assert len(history) == 1 assert history[0].id == inbound_sms_id