mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-16 01:40:15 +08:00
- Add 100+ new test files covering provider sources, platform adapters, agent runners, star/plugin system, knowledge base, core utils, pipeline, computer tools, builtin commands, and dashboard routes - Fix Python type errors in sqlite.py (col() wrappers for SQLModel), astr_agent_tool_exec, core_lifecycle, star context/manager - Fix TypeScript strict mode errors across 30+ dashboard Vue files - Add import smoke tests, auth roundtrip, startup tests - Add compile-all check and CLI entry test for AUR compatibility - Restore BotMessageAccumulator and helpers lost in merge
52 lines
1.4 KiB
Python
52 lines
1.4 KiB
Python
"""Import smoke tests for astrbot.core.star.command_management."""
|
|
from astrbot.core.star.command_management import (
|
|
CommandDescriptor,
|
|
sync_command_configs,
|
|
toggle_command,
|
|
rename_command,
|
|
update_command_permission,
|
|
list_commands,
|
|
list_command_conflicts,
|
|
)
|
|
|
|
|
|
def test_command_descriptor_class():
|
|
"""CommandDescriptor is importable and is a dataclass."""
|
|
assert isinstance(CommandDescriptor, type)
|
|
|
|
|
|
def test_sync_command_configs_is_async():
|
|
"""sync_command_configs is an async callable."""
|
|
import asyncio
|
|
assert asyncio.iscoroutinefunction(sync_command_configs)
|
|
|
|
|
|
def test_toggle_command_is_async():
|
|
"""toggle_command is an async callable."""
|
|
import asyncio
|
|
assert asyncio.iscoroutinefunction(toggle_command)
|
|
|
|
|
|
def test_rename_command_is_async():
|
|
"""rename_command is an async callable."""
|
|
import asyncio
|
|
assert asyncio.iscoroutinefunction(rename_command)
|
|
|
|
|
|
def test_update_command_permission_is_async():
|
|
"""update_command_permission is an async callable."""
|
|
import asyncio
|
|
assert asyncio.iscoroutinefunction(update_command_permission)
|
|
|
|
|
|
def test_list_commands_is_async():
|
|
"""list_commands is an async callable."""
|
|
import asyncio
|
|
assert asyncio.iscoroutinefunction(list_commands)
|
|
|
|
|
|
def test_list_command_conflicts_is_async():
|
|
"""list_command_conflicts is an async callable."""
|
|
import asyncio
|
|
assert asyncio.iscoroutinefunction(list_command_conflicts)
|