mirror of
https://github.com/open-jarvis/OpenJarvis.git
synced 2026-07-29 09:21:58 +00:00
fix: mock config in test_init_defaults to test class-level defaults
The test_init_defaults test expected OperativeAgent class defaults (temperature=0.3) but didn't mock load_config(), so when config loaded successfully it returned the global default (0.7) instead. Fix: mock load_config to raise, so the test properly validates the class-level _default_temperature/max_tokens/max_turns fallback path. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
4ccec01784
commit
9dbd172950
@@ -485,7 +485,11 @@ class TestOperativeAgent:
|
||||
from openjarvis.agents.operative import OperativeAgent
|
||||
|
||||
engine = FakeEngine()
|
||||
agent = OperativeAgent(engine, "test-model")
|
||||
with patch(
|
||||
"openjarvis.agents._stubs.load_config",
|
||||
side_effect=Exception("no config"),
|
||||
):
|
||||
agent = OperativeAgent(engine, "test-model")
|
||||
assert agent.agent_id == "operative"
|
||||
assert agent._temperature == 0.3
|
||||
assert agent._max_tokens == 2048
|
||||
|
||||
Reference in New Issue
Block a user