fix: isolate token_hex mock to wizard module and fix mypy annotation

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-23 10:01:07 +00:00
parent 4e1cd73338
commit 0188575c27
4 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -84,7 +84,7 @@ class TestWizardViewsPost:
assert mock_save.call_count == 0
@patch("app.views.wizard.save_setting_to_db")
@patch("app.views.wizard.secrets.token_hex")
@patch("app.views.wizard.token_hex")
def test_setup_wizard_auto_generate_session_secret(self, mock_token, mock_save, client):
"""Test auto-generation of session secret."""
mock_token.return_value = "auto_generated_secret_token_12345678"