42 lines
1.4 KiB
Python
42 lines
1.4 KiB
Python
# T18 — AC #16/#17: meta.usesAi on every node type; AI vs non-AI distinction.
|
|
|
|
import pytest
|
|
|
|
from modules.features.graphicalEditor.nodeDefinitions import STATIC_NODE_TYPES
|
|
|
|
|
|
def test_all_nodes_have_usesAi():
|
|
missing = [n["id"] for n in STATIC_NODE_TYPES if "usesAi" not in (n.get("meta") or {})]
|
|
assert not missing, f"Nodes missing meta.usesAi: {missing}"
|
|
|
|
|
|
def test_ai_prompt_uses_ai():
|
|
node = next(n for n in STATIC_NODE_TYPES if n["id"] == "ai.prompt")
|
|
assert node["meta"]["usesAi"] is True
|
|
|
|
|
|
def test_data_filter_not_ai():
|
|
node = next(n for n in STATIC_NODE_TYPES if n["id"] == "data.filter")
|
|
assert node["meta"]["usesAi"] is False
|
|
|
|
|
|
def test_data_consolidate_not_ai():
|
|
node = next(n for n in STATIC_NODE_TYPES if n["id"] == "data.consolidate")
|
|
assert node["meta"]["usesAi"] is False
|
|
|
|
|
|
def test_ai_consolidate_is_ai():
|
|
node = next(n for n in STATIC_NODE_TYPES if n["id"] == "ai.consolidate")
|
|
assert node["meta"]["usesAi"] is True
|
|
|
|
|
|
def test_trustee_extract_uses_ai_process_not():
|
|
ex = next(n for n in STATIC_NODE_TYPES if n["id"] == "trustee.extractFromFiles")
|
|
pr = next(n for n in STATIC_NODE_TYPES if n["id"] == "trustee.processDocuments")
|
|
assert ex["meta"]["usesAi"] is True
|
|
assert pr["meta"]["usesAi"] is False
|
|
|
|
|
|
def test_context_extract_not_ai():
|
|
node = next(n for n in STATIC_NODE_TYPES if n["id"] == "context.extractContent")
|
|
assert node["meta"]["usesAi"] is False
|