Files
smart-support/backend/tests/unit/test_main.py
Yaojia Wang 1050df780d feat: complete phase 2 -- multi-agent routing, interrupt TTL, escalation, templates
- Intent classification with LLM structured output (single/multi/ambiguous)
- Discount agent with apply_discount and generate_coupon tools
- Interrupt manager with 30-min TTL auto-expiration and retry prompts
- Webhook escalation module with exponential backoff retry (max 3)
- Three vertical industry templates (e-commerce, SaaS, fintech)
- Template loading in AgentRegistry
- Enhanced supervisor prompt with dynamic agent descriptions
- 153 tests passing, 90.18% coverage
2026-03-30 21:04:39 +02:00

28 lines
738 B
Python

"""Tests for app.main module."""
from __future__ import annotations
import pytest
from app.main import AGENTS_YAML, FRONTEND_DIST, app
@pytest.mark.unit
class TestMainModule:
def test_app_title(self) -> None:
assert app.title == "Smart Support"
def test_app_version(self) -> None:
assert app.version == "0.2.0"
def test_agents_yaml_path_exists(self) -> None:
assert AGENTS_YAML.name == "agents.yaml"
def test_frontend_dist_path(self) -> None:
assert "frontend" in str(FRONTEND_DIST)
assert "dist" in str(FRONTEND_DIST)
def test_websocket_route_registered(self) -> None:
routes = [r.path for r in app.routes if hasattr(r, "path")]
assert "/ws" in routes