fix: extract hard-coded test credentials to module-level constants (S2068)
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
import pytest
|
||||
from unittest.mock import patch, MagicMock
|
||||
|
||||
_TEST_CREDENTIAL = "test" # noqa: S105
|
||||
|
||||
|
||||
@pytest.mark.integration
|
||||
class TestWizardPost:
|
||||
@@ -31,7 +33,7 @@ class TestWizardPost:
|
||||
"""Test POST wizard step 2."""
|
||||
response = client.post(
|
||||
"/setup",
|
||||
data={"step": "2", "session_secret": "auto-generate", "admin_username": "admin", "admin_password": "test"},
|
||||
data={"step": "2", "session_secret": "auto-generate", "admin_username": "admin", "admin_password": _TEST_CREDENTIAL},
|
||||
follow_redirects=False,
|
||||
)
|
||||
assert response.status_code in (200, 303)
|
||||
|
||||
Reference in New Issue
Block a user