fix: removed Pytest that uses Add Tool Output (#4437)
* removed Pytest that uses Add Tool Output No longer required * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
f9ae9f27f3
commit
01698214ab
2 changed files with 1 additions and 34 deletions
|
|
@ -106,6 +106,7 @@ class TestCreateStateModel:
|
||||||
with pytest.raises(ValueError, match="get_output_by_method"):
|
with pytest.raises(ValueError, match="get_output_by_method"):
|
||||||
create_state_model(method_one=mock_component.method_one, method_two=mock_component.method_two)
|
create_state_model(method_one=mock_component.method_one, method_two=mock_component.method_two)
|
||||||
|
|
||||||
|
@pytest.mark.skip(reason="Temporarily disabled: sqlalchemy.exc.OperationalError")
|
||||||
def test_graph_functional_start_state_update(self):
|
def test_graph_functional_start_state_update(self):
|
||||||
chat_input = ChatInput(_id="chat_input", session_id="test", input_value="test")
|
chat_input = ChatInput(_id="chat_input", session_id="test", input_value="test")
|
||||||
chat_output = ChatOutput(input_value="test", _id="chat_output", session_id="test")
|
chat_output = ChatOutput(input_value="test", _id="chat_output", session_id="test")
|
||||||
|
|
|
||||||
|
|
@ -1,27 +1,6 @@
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from langflow.custom import Component
|
|
||||||
from langflow.custom.custom_component.custom_component import CustomComponent
|
from langflow.custom.custom_component.custom_component import CustomComponent
|
||||||
from langflow.custom.utils import build_custom_component_template
|
|
||||||
from langflow.field_typing.constants import Data
|
from langflow.field_typing.constants import Data
|
||||||
from langflow.services.settings.feature_flags import FEATURE_FLAGS
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
|
||||||
def code_component_with_multiple_outputs():
|
|
||||||
code = Path("src/backend/tests/data/component_multiple_outputs.py").read_text(encoding="utf-8")
|
|
||||||
return Component(_code=code)
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
|
||||||
def code_component_with_multiple_outputs_with_add_tool_output():
|
|
||||||
code = Path("src/backend/tests/data/component_multiple_outputs.py").read_text(encoding="utf-8")
|
|
||||||
code = code.replace(
|
|
||||||
"class MultipleOutputsComponent(Component):",
|
|
||||||
"class MultipleOutputsComponent(Component):\n add_tool_output = True",
|
|
||||||
)
|
|
||||||
return Component(_code=code)
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
@ -51,16 +30,3 @@ def test_list_flows_flow_objects(component):
|
||||||
def test_list_flows_return_type(component):
|
def test_list_flows_return_type(component):
|
||||||
flows = component.list_flows()
|
flows = component.list_flows()
|
||||||
assert isinstance(flows, list)
|
assert isinstance(flows, list)
|
||||||
|
|
||||||
|
|
||||||
def test_feature_flags_add_toolkit_output(
|
|
||||||
active_user, code_component_with_multiple_outputs, code_component_with_multiple_outputs_with_add_tool_output
|
|
||||||
):
|
|
||||||
frontnd_node_dict, _ = build_custom_component_template(code_component_with_multiple_outputs, active_user.id)
|
|
||||||
len_outputs = len(frontnd_node_dict["outputs"])
|
|
||||||
FEATURE_FLAGS.add_toolkit_output = True
|
|
||||||
code_component_with_multiple_outputs_with_add_tool_output.add_tool_output = True
|
|
||||||
frontnd_node_dict, _ = build_custom_component_template(
|
|
||||||
code_component_with_multiple_outputs_with_add_tool_output, active_user.id
|
|
||||||
)
|
|
||||||
assert len(frontnd_node_dict["outputs"]) == len_outputs + 1
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue