mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
feat(settings): add auto-organize exclusions
This commit is contained in:
@@ -540,7 +540,7 @@ def test_auto_organize_progress_returns_latest_snapshot(mock_service):
|
||||
|
||||
|
||||
def test_auto_organize_route_emits_progress(mock_service, monkeypatch: pytest.MonkeyPatch):
|
||||
async def fake_auto_organize(self, file_paths=None, progress_callback=None):
|
||||
async def fake_auto_organize(self, file_paths=None, progress_callback=None, exclusion_patterns=None):
|
||||
result = AutoOrganizeResult()
|
||||
result.total = 1
|
||||
result.processed = 1
|
||||
|
||||
@@ -53,10 +53,15 @@ class StubFileService:
|
||||
*,
|
||||
file_paths: Optional[List[str]] = None,
|
||||
progress_callback=None,
|
||||
exclusion_patterns=None,
|
||||
) -> AutoOrganizeResult:
|
||||
result = AutoOrganizeResult()
|
||||
result.total = len(file_paths or [])
|
||||
self.calls.append({"file_paths": file_paths, "progress_callback": progress_callback})
|
||||
self.calls.append({
|
||||
"file_paths": file_paths,
|
||||
"progress_callback": progress_callback,
|
||||
"exclusion_patterns": exclusion_patterns,
|
||||
})
|
||||
return result
|
||||
|
||||
|
||||
@@ -144,6 +149,7 @@ async def test_auto_organize_use_case_executes_with_lock() -> None:
|
||||
|
||||
assert isinstance(result, AutoOrganizeResult)
|
||||
assert file_service.calls[0]["file_paths"] == ["model1"]
|
||||
assert file_service.calls[0]["exclusion_patterns"] is None
|
||||
|
||||
|
||||
async def test_auto_organize_use_case_rejects_when_running() -> None:
|
||||
|
||||
Reference in New Issue
Block a user