forked from Rockachopa/Timmy-time-dashboard
Move 97 test files from flat tests/ into 13 subdirectories: tests/dashboard/ (8 files — routes, mobile, mission control) tests/swarm/ (17 files — coordinator, docker, routing, tasks) tests/timmy/ (12 files — agent, backends, CLI, tools) tests/self_coding/ (14 files — git safety, indexer, self-modify) tests/lightning/ (3 files — L402, LND, interface) tests/creative/ (8 files — assembler, director, image/music/video) tests/integrations/ (10 files — chat bridge, telegram, voice, websocket) tests/mcp/ (4 files — bootstrap, discovery, executor) tests/spark/ (3 files — engine, tools, events) tests/hands/ (3 files — registry, oracle, phase5) tests/scripture/ (1 file) tests/infrastructure/ (3 files — router cascade, API) tests/security/ (3 files — XSS, regression) Fix Path(__file__) reference in test_mobile_scenarios.py for new depth. Add __init__.py to all test subdirectories. Tests: 1503 passed, 9 failed (pre-existing), 53 errors (pre-existing) https://claude.ai/code/session_019oMFNvD8uSGSSmBMGkBfQN
44 lines
1.2 KiB
Python
44 lines
1.2 KiB
Python
"""Tests for shortcuts/siri.py — Siri Shortcuts integration."""
|
|
|
|
from shortcuts.siri import get_setup_guide, SHORTCUT_ACTIONS
|
|
|
|
|
|
def test_setup_guide_has_title():
|
|
guide = get_setup_guide()
|
|
assert "title" in guide
|
|
assert "Timmy" in guide["title"]
|
|
|
|
|
|
def test_setup_guide_has_instructions():
|
|
guide = get_setup_guide()
|
|
assert "instructions" in guide
|
|
assert len(guide["instructions"]) > 0
|
|
|
|
|
|
def test_setup_guide_has_actions():
|
|
guide = get_setup_guide()
|
|
assert "actions" in guide
|
|
assert len(guide["actions"]) > 0
|
|
|
|
|
|
def test_setup_guide_actions_have_required_fields():
|
|
guide = get_setup_guide()
|
|
for action in guide["actions"]:
|
|
assert "name" in action
|
|
assert "endpoint" in action
|
|
assert "method" in action
|
|
assert "description" in action
|
|
|
|
|
|
def test_shortcut_actions_catalog():
|
|
assert len(SHORTCUT_ACTIONS) >= 4
|
|
names = [a.name for a in SHORTCUT_ACTIONS]
|
|
assert "Chat with Timmy" in names
|
|
assert "Check Status" in names
|
|
|
|
|
|
def test_chat_shortcut_is_post():
|
|
chat = next(a for a in SHORTCUT_ACTIONS if a.name == "Chat with Timmy")
|
|
assert chat.method == "POST"
|
|
assert "/shortcuts/chat" in chat.endpoint
|