Files
AstrBot/tests/test_kb_models.py
LIghtJUNction dcaaf6286a test: comprehensive test coverage and type fixes
- 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
2026-04-29 06:29:56 +08:00

32 lines
963 B
Python

"""Import smoke tests for the knowledge base models module."""
from __future__ import annotations
from astrbot.core.knowledge_base.models import (
KBDocument,
KBMedia,
KnowledgeBase,
)
class TestKBModelsImports:
"""Verify that the main model classes from models can be imported."""
def test_import_knowledge_base(self):
assert KnowledgeBase is not None
assert hasattr(KnowledgeBase, "kb_id")
assert hasattr(KnowledgeBase, "kb_name")
assert hasattr(KnowledgeBase, "embedding_provider_id")
def test_import_kb_document(self):
assert KBDocument is not None
assert hasattr(KBDocument, "doc_id")
assert hasattr(KBDocument, "kb_id")
assert hasattr(KBDocument, "doc_name")
def test_import_kb_media(self):
assert KBMedia is not None
assert hasattr(KBMedia, "media_id")
assert hasattr(KBMedia, "doc_id")
assert hasattr(KBMedia, "media_type")