fix: clear TOTP secret in test_verify_totp_no_secret_enabled for test isolation
Run Tests / Backend Tests (push) Failing after 2m6s
Run Tests / Frontend Tests (push) Failing after 1m26s
Run Tests / Test Summary (push) Has started running

This commit is contained in:
Gan, Jimmy
2026-04-04 13:47:05 +08:00
parent 6285f03c36
commit 83fc231c75
@@ -232,6 +232,8 @@ class TestTOTP:
def test_verify_totp_no_secret_enabled(self, mock_config, temp_auth_file): def test_verify_totp_no_secret_enabled(self, mock_config, temp_auth_file):
"""Test that TOTP verification passes when 2FA not enabled.""" """Test that TOTP verification passes when 2FA not enabled."""
# Clear any existing secret from previous tests
save_totp_secret("")
# No secret saved, should return True (2FA disabled) # No secret saved, should return True (2FA disabled)
assert verify_totp("any_code") assert verify_totp("any_code")