Files

29 lines
876 B
Python
Raw Permalink Normal View History

"""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
# Ensure /a0 is on sys.path so `usr.plugins...` imports resolve
if "/a0" not in sys.path:
sys.path.insert(0, "/a0")
# 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