mirror of
https://github.com/langgenius/dify.git
synced 2025-12-25 01:00:42 -05:00
refactor(workflow): remove redundant get_base_node_data() method (#28803)
This commit is contained in:
@@ -744,7 +744,7 @@ def test_graph_run_emits_partial_success_when_node_failure_recovered():
|
||||
)
|
||||
|
||||
llm_node = graph.nodes["llm"]
|
||||
base_node_data = llm_node.get_base_node_data()
|
||||
base_node_data = llm_node.node_data
|
||||
base_node_data.error_strategy = ErrorStrategy.DEFAULT_VALUE
|
||||
base_node_data.default_value = [DefaultValue(key="text", value="fallback response", type=DefaultValueType.STRING)]
|
||||
|
||||
|
||||
@@ -471,8 +471,8 @@ class TestCodeNodeInitialization:
|
||||
|
||||
assert node._get_description() is None
|
||||
|
||||
def test_get_base_node_data(self):
|
||||
"""Test get_base_node_data returns node data."""
|
||||
def test_node_data_property(self):
|
||||
"""Test node_data property returns node data."""
|
||||
node = CodeNode.__new__(CodeNode)
|
||||
node._node_data = CodeNodeData(
|
||||
title="Base Test",
|
||||
@@ -482,7 +482,7 @@ class TestCodeNodeInitialization:
|
||||
outputs={},
|
||||
)
|
||||
|
||||
result = node.get_base_node_data()
|
||||
result = node.node_data
|
||||
|
||||
assert result == node._node_data
|
||||
assert result.title == "Base Test"
|
||||
|
||||
@@ -240,8 +240,8 @@ class TestIterationNodeInitialization:
|
||||
|
||||
assert node._get_description() == "This is a description"
|
||||
|
||||
def test_get_base_node_data(self):
|
||||
"""Test get_base_node_data returns node data."""
|
||||
def test_node_data_property(self):
|
||||
"""Test node_data property returns node data."""
|
||||
node = IterationNode.__new__(IterationNode)
|
||||
node._node_data = IterationNodeData(
|
||||
title="Base Test",
|
||||
@@ -249,7 +249,7 @@ class TestIterationNodeInitialization:
|
||||
output_selector=["y"],
|
||||
)
|
||||
|
||||
result = node.get_base_node_data()
|
||||
result = node.node_data
|
||||
|
||||
assert result == node._node_data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user