refactor: fix static method warnings, hard-coded credentials, and Annotated type hints
- Add @staticmethod to 9 test methods in test_external_integrations.py that don't use self (PYL-R0201) - Extract hard-coded password literals to constants in 6 test files to resolve S2068 warnings (fixtures_integration, test_imap_tasks, test_upload_tasks, test_upload_webdav_comprehensive, test_upload_webdav_integration, test_views_coverage) - Migrate Form() dependency injection to Annotated type hints in dropbox.py, google_drive.py, onedrive.py (Sonar fastapi convention) Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
"""Additional view tests to increase coverage."""
|
||||
|
||||
import pytest
|
||||
from unittest.mock import patch, MagicMock
|
||||
|
||||
@@ -33,7 +34,12 @@ class TestWizardPost:
|
||||
"""Test POST wizard step 2."""
|
||||
response = client.post(
|
||||
"/setup",
|
||||
data={"step": "2", "session_secret": "auto-generate", "admin_username": "admin", "admin_password": _TEST_CREDENTIAL},
|
||||
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