test(security): patch get_setting_from_snapshot at its source module

tests/security/test_api_key_leakage.py patched
local_deep_research.llm.providers.openai_base.get_setting_from_snapshot,
but the refactor made that import function-local in openai_base (so source-
module patches are picked up), so the module no longer exposes it and the
patch raised AttributeError. This file came in via the merge of main and
was not in the PR's original diff, so the same merge fix applied to the
anthropic/openai test files was missed here. Repoint both patches at
local_deep_research.config.thread_settings.get_setting_from_snapshot, the
convention documented in openai_base.py's header.
This commit is contained in:
LearningCircuit
2026-06-13 09:18:31 +02:00
parent 620b4d7379
commit 3e8a1e949f

View File

@@ -344,7 +344,7 @@ class TestOpenAIBaseProviderKeyLeakage:
return_value=False,
):
with patch(
"local_deep_research.llm.providers.openai_base."
"local_deep_research.config.thread_settings."
"get_setting_from_snapshot",
return_value=_LEAKED_KEY,
):
@@ -390,7 +390,7 @@ class TestOpenAIBaseProviderKeyLeakage:
side_effect=exc,
):
with patch(
"local_deep_research.llm.providers.openai_base."
"local_deep_research.config.thread_settings."
"get_setting_from_snapshot",
return_value=_LEAKED_KEY,
):