mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-15 17:30:13 +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
51 lines
1.8 KiB
Python
51 lines
1.8 KiB
Python
"""Import smoke tests for CUA booter."""
|
|
|
|
import pytest
|
|
|
|
|
|
class TestCuaBooterImports:
|
|
"""Verify cua.py module can be imported and key classes exist."""
|
|
|
|
def test_module_import(self):
|
|
"""Import the module without error."""
|
|
from astrbot.core.computer.booters import cua
|
|
assert cua is not None
|
|
|
|
def test_cua_booter_class(self):
|
|
"""CuaBooter is present and subclasses ComputerBooter."""
|
|
from astrbot.core.computer.booters.cua import CuaBooter
|
|
from astrbot.core.computer.booters.base import ComputerBooter
|
|
assert CuaBooter is not None
|
|
assert issubclass(CuaBooter, ComputerBooter)
|
|
|
|
def test_cua_shell_component(self):
|
|
"""CuaShellComponent is present."""
|
|
from astrbot.core.computer.booters.cua import CuaShellComponent
|
|
assert CuaShellComponent is not None
|
|
|
|
def test_cua_python_component(self):
|
|
"""CuaPythonComponent is present."""
|
|
from astrbot.core.computer.booters.cua import CuaPythonComponent
|
|
assert CuaPythonComponent is not None
|
|
|
|
def test_cua_filesystem_component(self):
|
|
"""CuaFileSystemComponent is present."""
|
|
from astrbot.core.computer.booters.cua import CuaFileSystemComponent
|
|
assert CuaFileSystemComponent is not None
|
|
|
|
def test_cua_gui_component(self):
|
|
"""CuaGUIComponent is present."""
|
|
from astrbot.core.computer.booters.cua import CuaGUIComponent
|
|
assert CuaGUIComponent is not None
|
|
|
|
def helper_functions_exist(self):
|
|
"""Key helper functions are importable."""
|
|
from astrbot.core.computer.booters.cua import (
|
|
build_cua_booter_kwargs,
|
|
_normalize_process_result,
|
|
_screenshot_to_bytes,
|
|
)
|
|
assert callable(build_cua_booter_kwargs)
|
|
assert callable(_normalize_process_result)
|
|
assert callable(_screenshot_to_bytes)
|