This commit is contained in:
1 parent
321421e37f
commit
120ab192f1
7 files changed
+558
-79
No files matched your search
@@ -12,6 +12,7 @@ import pytest
|
||||
sys.path.insert(0, str(Path(__file__).parents[1] / "agent"))
|
||||
from task_registry import TaskRegistry # noqa: E402
|
||||
from task_router import should_force_background_task # noqa: E402
|
||||
from task_worker import TaskWorker # noqa: E402
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@@ -46,6 +47,16 @@ def test_direct_requests_do_not_force_dispatch(utterance):
|
||||
assert not should_force_background_task(utterance)
|
||||
|
||||
|
||||
def test_deferred_task_answers_are_rejected():
|
||||
assert TaskWorker._is_deferred_answer(
|
||||
"I need to perform a more targeted search. Would you like me to continue?"
|
||||
)
|
||||
assert TaskWorker._is_deferred_answer("I can refine this if you'd like.")
|
||||
assert not TaskWorker._is_deferred_answer(
|
||||
"Reuters reports that the agreement was signed today, while the BBC says voting begins Monday."
|
||||
)
|
||||
|
||||
|
||||
def test_task_event_directories_are_isolated(tmp_path):
|
||||
first = TaskRegistry(tmp_path / "room-one")
|
||||
second = TaskRegistry(tmp_path / "room-two")
|
||||
|
||||
Reference in new issue
Block a user