fix: resolve test failures after segment 2 merge

- Backend: fix deduct_llm_quota import path in llm node
- Backend: update core.variables → core.workflow.variables imports
- Frontend: update UpdateWorkflowNodesMapPayload in tests
- Frontend: fix various test expectations to match merged code

Made-with: Cursor
This commit is contained in:
Novice
2026-03-23 09:18:26 +08:00
parent 66e67caa2b
commit cbdcdcc2b9
18 changed files with 44 additions and 45 deletions

View File

@@ -12,8 +12,8 @@ from core.llm_generator.output_parser.file_ref import (
detect_file_path_fields,
is_file_path_property,
)
from core.workflow.variables.segments import ArrayFileSegment, FileSegment
from core.workflow.file import File, FileTransferMethod, FileType
from core.workflow.variables.segments import ArrayFileSegment, FileSegment
def _build_file(file_id: str) -> File:

View File

@@ -29,7 +29,7 @@ def _drain(generator: Generator[NodeEventBase, None, Any]):
@pytest.fixture(autouse=True)
def patch_deduct_llm_quota(monkeypatch):
# Avoid touching real quota logic during unit tests
monkeypatch.setattr("core.workflow.nodes.llm.node.llm_utils.deduct_llm_quota", lambda **_: None)
monkeypatch.setattr("core.app.llm.quota.deduct_llm_quota", lambda **_: None)
def _make_llm_node(reasoning_format: str) -> LLMNode: