mirror of
https://github.com/LearningCircuit/local-deep-research.git
synced 2026-06-15 19:46:56 +03:00
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:
@@ -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,
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user