19 lines
674 B
Python
19 lines
674 B
Python
from app.task_center import AIOSTaskRecord, TaskCenter, TaskNotificationStatus, TaskProgress
|
|
|
|
|
|
def test_task_center_tracks_progress_and_notification():
|
|
result = TaskCenter().summarize([
|
|
AIOSTaskRecord(
|
|
task_id="t1",
|
|
title="deploy search gateway",
|
|
assigned_by="owner",
|
|
executor="openclaw",
|
|
source="cmd",
|
|
status="completed",
|
|
progress=TaskProgress(percent=100, current_step="done"),
|
|
notification=TaskNotificationStatus(required=True, sent=False),
|
|
)
|
|
])
|
|
assert result["summary"]["completed"] == 1
|
|
assert result["summary"]["notification_pending"] == 1
|