mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 02:11:11 -05:00
fix test code
This commit is contained in:
@@ -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()
|
deleted_count = delete_inbound_sms_older_than_retention()
|
||||||
|
|
||||||
stmt = select(InboundSmsHistory)
|
stmt = select(InboundSmsHistory)
|
||||||
history = db.session.execute(stmt).all()
|
history = db.session.execute(stmt).scalars().all()
|
||||||
assert len(history) == 7
|
assert len(history) == 7
|
||||||
|
|
||||||
# four deleted for the 3-day service, two for the default seven days one, one for the 30 day
|
# 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()
|
delete_inbound_sms_older_than_retention()
|
||||||
stmt = select(InboundSmsHistory)
|
stmt = select(InboundSmsHistory)
|
||||||
history = db.session.execute(stmt).all()
|
history = db.session.execute(stmt).scalars().all()
|
||||||
assert len(history) == 1
|
assert len(history) == 1
|
||||||
|
|
||||||
for key_name in [
|
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()
|
delete_inbound_sms_older_than_retention()
|
||||||
|
|
||||||
stmt = select(InboundSmsHistory)
|
stmt = select(InboundSmsHistory)
|
||||||
history = db.session.execute(stmt).all()
|
history = db.session.execute(stmt).scalars().all()
|
||||||
assert len(history) == 1
|
assert len(history) == 1
|
||||||
|
|
||||||
assert history[0].id == inbound_sms_id
|
assert history[0].id == inbound_sms_id
|
||||||
|
|||||||
Reference in New Issue
Block a user