test: add verification and Docker test suite

This commit is contained in:
SXP-Simon
2026-02-07 23:50:13 +08:00
parent 5ebe211791
commit 3b59321b11
3 changed files with 327 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
import sys
import types
from unittest.mock import MagicMock
# Helper to mock packages
def mock_package(name):
m = types.ModuleType(name)
sys.modules[name] = m
return m
# Mock key dependencies
mock_package("mcp")
mock_package("mcp.server")
mock_package("mcp.server.fastmcp")
mock_package("google")
mock_package("google.genai")
mock_package("google.generativeai")
mock_package("openai")
mock_package("anthropic")
mock_package("httpx")
# Adjust path to include the plugin directory
sys.path.append(
r"c:\Helianthus\astrpro\AstrBot-master\data\plugins\astrbot_plugin_qq_group_daily_analysis"
)
sys.path.append(r"c:\Helianthus\astrpro\AstrBot-master")
print("Starting import...")
try:
from main import QQGroupDailyAnalysis
print("Import successful")
except Exception:
import traceback
traceback.print_exc()