test_connections.py 669 B

123456789101112131415161718192021222324
  1. from __future__ import annotations
  2. """快速验证项目基础配置与外部服务连接是否可用。"""
  3. import asyncio
  4. from rich.console import Console
  5. from scripts.test_amap_mcp import main as test_amap_mcp
  6. from scripts.test_serpapi import main as test_serpapi
  7. console = Console()
  8. async def main()->None:
  9. console.rule("[bold blue]TravelMind 外部服务连接性测试")
  10. console.print("\n[bold]开始测试 SerpAPI[/bold]")
  11. await test_serpapi()
  12. console.print("\n[bold]开始测试 高德MCP[/bold]")
  13. await test_amap_mcp()
  14. console.rule("[bold green]全部外部服务测试通过")
  15. if __name__ == "__main__":
  16. asyncio.run(main())