From 6108ca54c4877f39cfac73e27e8bd2f11f9c27aa Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Mon, 13 Apr 2026 19:36:47 -0400 Subject: [PATCH] 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) --- tests/app/routers/test_recall_parameters.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/app/routers/test_recall_parameters.py b/tests/app/routers/test_recall_parameters.py index 578085f4cb..c7efdb59bd 100644 --- a/tests/app/routers/test_recall_parameters.py +++ b/tests/app/routers/test_recall_parameters.py @@ -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",