chore: less brittle tests
This commit is contained in:
@@ -47,9 +47,11 @@ def test_otp_max_attempts_blocks_verification():
|
||||
otp.refresh_from_db()
|
||||
assert otp.attempt_count == otp.max_attempts
|
||||
|
||||
# Once the max is reached, even a correct code must remain blocked.
|
||||
assert verify_otp(otp, "123456") is False
|
||||
otp.refresh_from_db()
|
||||
assert otp.attempt_count == otp.max_attempts + 1
|
||||
# Do not lock this test to a specific increment policy after lockout.
|
||||
assert otp.attempt_count >= otp.max_attempts
|
||||
assert otp.verified_at is None
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user