25 lines
755 B
Python
25 lines
755 B
Python
|
|
"""conftest.py für helpers/tests/ – mockt helpers.tool, um plan_mode_guard-Tests
|
|||
|
|
zu ermöglichen, ohne das Agent-Framework (helpers.tool → helpers.history → langchain.prompts)
|
|||
|
|
laden zu müssen.
|
|||
|
|
|
|||
|
|
Wir mocken nur das minimale Tool/Response-Interface, das plan_mode_guard braucht.
|
|||
|
|
"""
|
|||
|
|
import sys
|
|||
|
|
from types import SimpleNamespace
|
|||
|
|
from unittest.mock import MagicMock
|
|||
|
|
|
|||
|
|
|
|||
|
|
# Minimal-Stubs für helpers.tool: Tool als leere Klasse, Response als SimpleNamespace
|
|||
|
|
class _FakeResponse:
|
|||
|
|
def __init__(self, message="", break_loop=False):
|
|||
|
|
self.message = message
|
|||
|
|
self.break_loop = break_loop
|
|||
|
|
|
|||
|
|
|
|||
|
|
class _FakeTool:
|
|||
|
|
pass
|
|||
|
|
|
|||
|
|
|
|||
|
|
_fake_tool_module = SimpleNamespace(Tool=_FakeTool, Response=_FakeResponse)
|
|||
|
|
sys.modules["helpers.tool"] = _fake_tool_module
|