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:
copilot-swe-agent[bot]
2026-02-11 16:50:37 +00:00
parent 7ad2bdfc4b
commit 7c4d6fd025
10 changed files with 83 additions and 53 deletions
+4 -2
View File
@@ -34,6 +34,8 @@ from tests.fixtures_integration import (
db_session_real,
)
_TEST_CREDENTIAL = "pass" # noqa: S105
@pytest.mark.integration
@pytest.mark.requires_docker
@@ -131,7 +133,7 @@ class TestEndToEndWithRedis:
with patch("app.tasks.upload_to_webdav.settings") as mock_settings:
mock_settings.webdav_url = "http://test.com"
mock_settings.webdav_username = "user"
mock_settings.webdav_password = "pass"
mock_settings.webdav_password = _TEST_CREDENTIAL
# This will queue the task in Redis
result = upload_to_webdav.apply_async(args=["/tmp/test.txt"], kwargs={"file_id": 1})
@@ -232,7 +234,7 @@ class TestEndToEndWithRedis:
mock_settings.webdav_url = "http://test.com/"
mock_settings.webdav_username = "user"
mock_settings.webdav_password = "pass"
mock_settings.webdav_password = _TEST_CREDENTIAL
mock_settings.webdav_folder = ""
mock_settings.webdav_verify_ssl = False
mock_settings.http_request_timeout = 30