mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
fix(test): patch ApiDependencies in auth_dependencies to fix recall tests
The patched_dependencies fixture only monkeypatched ApiDependencies in the recall_parameters module, but the endpoint also resolves CurrentUserOrDefault via auth_dependencies, which accesses ApiDependencies.invoker independently. Patch both import sites. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -47,6 +47,7 @@ def patched_dependencies(monkeypatch: Any, mock_invoker: Invoker) -> MockApiDepe
|
||||
"""
|
||||
dependencies = MockApiDependencies(mock_invoker)
|
||||
monkeypatch.setattr("invokeai.app.api.routers.recall_parameters.ApiDependencies", dependencies)
|
||||
monkeypatch.setattr("invokeai.app.api.auth_dependencies.ApiDependencies", dependencies)
|
||||
monkeypatch.setattr(
|
||||
mock_invoker.services.client_state_persistence,
|
||||
"set_by_key",
|
||||
|
||||
Reference in New Issue
Block a user