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")
|
||||
|
||||
@@ -12,12 +12,17 @@ def test_index_serves(client):
|
||||
assert "Hope" in body
|
||||
assert "livekit-client.umd.js" in body
|
||||
assert "app.js" in body
|
||||
assert 'id="voiceModeBtn"' in body
|
||||
assert 'id="textModeBtn"' in body
|
||||
assert 'id="chatComposer"' in body
|
||||
|
||||
|
||||
def test_app_js_serves(client):
|
||||
resp = client.get("/app.js")
|
||||
assert resp.status_code == 200
|
||||
assert "LiveKitClient" in resp.text or "Room" in resp.text
|
||||
assert 'topic: "lk.chat"' in resp.text
|
||||
assert "sendModeMessage" in resp.text
|
||||
|
||||
|
||||
def test_style_css_serves(client):
|
||||
|
||||
Reference in new issue
Block a user