try to fix test code

This commit is contained in:
Kenneth Kehl
2024-10-11 08:07:22 -07:00
parent 3adedc5351
commit ad1ef5bfd2
2 changed files with 17 additions and 14 deletions

View File

@@ -143,7 +143,7 @@ def test_should_not_delete_verification_codes_less_than_one_day_old(sample_user)
sample_user, age=timedelta(hours=23, minutes=59, seconds=59), code="12345"
)
make_verify_code(sample_user, age=timedelta(hours=24), code="54321")
stmt = select(func.count(VerifyCode))
stmt = select(func.count(VerifyCode.id))
assert db.session.execute(stmt).scalar() == 2
delete_codes_older_created_more_than_a_day_ago()
stmt = select(VerifyCode)