Files
Agentic-OS/backend/tests/test_task_runtime.py
nearxos 6185b9b85a Initial commit: Agentic OS troubleshooting platform
Self-hosted, Docker-based agentic troubleshooting platform: FastAPI backend +
LangGraph agent, Next.js UI, tiered LLM routing (local Ollama -> Gemini ->
DeepSeek -> OpenRouter), MCP server manager, encrypted device credentials,
RBAC, audit log, project-memory + Obsidian integrations, and editable
troubleshooting decision rules tuned for the GeneseasX vessel stack.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-14 22:11:07 +03:00

29 lines
769 B
Python

"""Tests for per-task runtime flags."""
from app.services.task_runtime import (
CANCELLABLE_STATUSES,
TaskCancelledError,
apply_min_tier_floor,
)
def test_cancellable_statuses():
assert "running" in CANCELLABLE_STATUSES
assert "queued" in CANCELLABLE_STATUSES
assert "succeeded" not in CANCELLABLE_STATUSES
def test_task_cancelled_error_message():
err = TaskCancelledError("Task cancelled by user")
assert "cancelled" in str(err).lower()
def test_apply_min_tier_floor_skips_local():
assert apply_min_tier_floor(["local", "economy", "premium"], "economy") == [
"economy",
"premium",
]
def test_apply_min_tier_floor_premium():
assert apply_min_tier_floor(["local", "economy"], "premium") == ["premium"]