fix: resolve 48 lint errors in test files
- Remove whitespace from 22 blank lines (W293) - Remove 6 unused imports (F401): os, Mock, MagicMock, Path - Add missing imports for 12 test functions (F821): sanitize_filename, extract_remote_path, MagicMock - Fix 1 unsorted import block (I001) All ruff checks now pass successfully. Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -8,7 +8,7 @@ Focuses on:
|
||||
- Mixed encryption states
|
||||
"""
|
||||
|
||||
from unittest.mock import patch
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
import pytest
|
||||
from sqlalchemy.exc import SQLAlchemyError
|
||||
@@ -397,7 +397,7 @@ class TestSaveSettingErrors:
|
||||
mock_db.commit.side_effect = SQLAlchemyError("Database error")
|
||||
|
||||
success, error = save_setting(mock_db, "test_key", "test_value")
|
||||
|
||||
|
||||
assert success is False
|
||||
assert "error" in error.lower() or "failed" in error.lower()
|
||||
# Should rollback on error
|
||||
|
||||
Reference in New Issue
Block a user