mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-08-29 03:56:43 +08:00
fix(ci): use canonical agent imports in tests
This commit is contained in:
@@ -8,9 +8,10 @@ from unittest.mock import AsyncMock, patch
|
||||
import pytest
|
||||
from langchain_core.messages import AIMessage, HumanMessage
|
||||
|
||||
from app.agent import MoviePilotAgent, ReplyMode, _CompiledAgentBundle
|
||||
from app.agent.contracts import ReplyMode
|
||||
from app.agent.mcp import AgentMcpToolSpec
|
||||
from app.agent.middleware.policy import AgentPolicyMiddleware
|
||||
from app.agent.orchestrator import MoviePilotAgent, _CompiledAgentBundle
|
||||
from app.agent.tools.catalog import (
|
||||
ToolCatalogSnapshot,
|
||||
ToolIdentityAmbiguousError,
|
||||
|
||||
@@ -14,7 +14,7 @@ from langchain_core.messages import ToolMessage
|
||||
from app.agent.middleware.policy import AgentPolicyMiddleware
|
||||
from app.agent.middleware.subagents import SubAgentTaskControlMiddleware
|
||||
from app.agent.orchestrator import MoviePilotAgent
|
||||
from app.agent.policy import (
|
||||
from app.agent.policy.contracts import (
|
||||
AuthSource,
|
||||
PrincipalType,
|
||||
ToolOrigin,
|
||||
|
||||
@@ -15,7 +15,12 @@ from app.agent.middleware.subagents import (
|
||||
SubAgentTaskControlMiddleware,
|
||||
create_subagent_middlewares,
|
||||
)
|
||||
from app.agent.policy import AuthSource, PrincipalType, ToolOrigin, ToolPolicyContext
|
||||
from app.agent.policy.contracts import (
|
||||
AuthSource,
|
||||
PrincipalType,
|
||||
ToolOrigin,
|
||||
ToolPolicyContext,
|
||||
)
|
||||
from app.agent.tools.tags import ToolTag
|
||||
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ def test_shutdown_blocking_executors_cancels_queued_workers_and_is_idempotent():
|
||||
|
||||
def test_create_agent_config_uses_llm_max_iterations():
|
||||
"""Agent 执行配置应把 LLM_MAX_ITERATIONS 传给 LangGraph recursion_limit。"""
|
||||
from app.agent import MoviePilotAgent
|
||||
from app.agent.orchestrator import MoviePilotAgent
|
||||
from langchain_core.messages import AIMessage
|
||||
|
||||
class _FakeGraphState:
|
||||
|
||||
Reference in New Issue
Block a user