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
43 lines
1.5 KiB
Python
43 lines
1.5 KiB
Python
"""Import smoke tests for CozeAgentRunner."""
|
|
|
|
import pytest
|
|
|
|
from astrbot.core.agent.runners.coze.coze_agent_runner import CozeAgentRunner
|
|
|
|
|
|
class TestCozeAgentRunnerImport:
|
|
"""Verify CozeAgentRunner can be imported and instantiated."""
|
|
|
|
def test_class_importable(self):
|
|
"""CozeAgentRunner should be importable."""
|
|
assert CozeAgentRunner is not None
|
|
|
|
def test_instantiation(self):
|
|
"""CozeAgentRunner should be instantiatable without arguments."""
|
|
runner = CozeAgentRunner()
|
|
assert isinstance(runner, CozeAgentRunner)
|
|
|
|
def test_inherits_base_agent_runner(self):
|
|
"""CozeAgentRunner should inherit from BaseAgentRunner."""
|
|
from astrbot.core.agent.runners.base import BaseAgentRunner
|
|
|
|
assert issubclass(CozeAgentRunner, BaseAgentRunner)
|
|
|
|
def test_default_state_is_idle(self):
|
|
"""A freshly instantiated runner should have IDLE state."""
|
|
from astrbot.core.agent.runners.base import AgentState
|
|
|
|
runner = CozeAgentRunner()
|
|
assert runner._state == AgentState.IDLE
|
|
|
|
def test_done_returns_false_when_idle(self):
|
|
"""done() should return False when in IDLE state."""
|
|
runner = CozeAgentRunner()
|
|
assert runner.done() is False
|
|
|
|
def test_get_final_llm_resp_returns_none_when_uninitialized(self):
|
|
"""get_final_llm_resp() should return None before reset()."""
|
|
runner = CozeAgentRunner()
|
|
runner.final_llm_resp = None
|
|
assert runner.get_final_llm_resp() is None
|