Files
manual_slop/tests/test_user_agent.py

23 lines
611 B
Python

import sys
import os
# Ensure project root is in path for imports
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
from simulation.user_agent import UserSimAgent
def test_user_agent_instantiation() -> None:
agent = UserSimAgent(hook_client=None)
assert agent is not None
def test_perform_action_with_delay() -> None:
agent = UserSimAgent(hook_client=None)
called = False
def action():
nonlocal called
called = True
agent.perform_action_with_delay(action)
assert called is True