fix test code

This commit is contained in:
Kenneth Kehl
2024-10-21 08:15:07 -07:00
parent 38a2a87a15
commit a3a5abc521

View File

@@ -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