20 lines
619 B
Python
20 lines
619 B
Python
from app.task_orchestrator import TaskOrchestrator
|
|
|
|
|
|
def test_command_creates_task():
|
|
orchestrator = TaskOrchestrator()
|
|
task = orchestrator.create_from_command("ops/openclaw/CMD-test.md", "active")
|
|
assert task["source"] == "command_watcher"
|
|
assert task["executor"] == "openclaw"
|
|
|
|
|
|
def test_agent_execution_creates_task():
|
|
orchestrator = TaskOrchestrator()
|
|
task = orchestrator.create_from_agent_execution({
|
|
"execution_id": "e1",
|
|
"entry_agent": "hermes",
|
|
"status": "completed",
|
|
})
|
|
assert task["source"] == "agent_execution"
|
|
assert task["status"] == "completed"
|