From 1130a94d768fa8718e72fc5815f7f611567742b2 Mon Sep 17 00:00:00 2001 From: -LAN- Date: Fri, 18 Jul 2025 01:55:14 +0800 Subject: [PATCH] test(integration_tests): Fix tests Signed-off-by: -LAN- --- api/tests/integration_tests/workflow/nodes/test_code.py | 4 ++++ api/tests/integration_tests/workflow/nodes/test_http.py | 8 +++++++- api/tests/integration_tests/workflow/nodes/test_llm.py | 4 ++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/api/tests/integration_tests/workflow/nodes/test_code.py b/api/tests/integration_tests/workflow/nodes/test_code.py index 9d17307ecf..707b28e6d8 100644 --- a/api/tests/integration_tests/workflow/nodes/test_code.py +++ b/api/tests/integration_tests/workflow/nodes/test_code.py @@ -66,6 +66,10 @@ def init_code_node(code_config: dict): config=code_config, ) + # Initialize node data + if "data" in code_config: + node.init_node_data(code_config["data"]) + return node diff --git a/api/tests/integration_tests/workflow/nodes/test_http.py b/api/tests/integration_tests/workflow/nodes/test_http.py index 50e726febf..d7856129a3 100644 --- a/api/tests/integration_tests/workflow/nodes/test_http.py +++ b/api/tests/integration_tests/workflow/nodes/test_http.py @@ -52,7 +52,7 @@ def init_http_node(config: dict): variable_pool.add(["a", "b123", "args1"], 1) variable_pool.add(["a", "b123", "args2"], 2) - return HttpRequestNode( + node = HttpRequestNode( id=str(uuid.uuid4()), graph_init_params=init_params, graph=graph, @@ -60,6 +60,12 @@ def init_http_node(config: dict): config=config, ) + # Initialize node data + if "data" in config: + node.init_node_data(config["data"]) + + return node + @pytest.mark.parametrize("setup_http_mock", [["none"]], indirect=True) def test_get(setup_http_mock): diff --git a/api/tests/integration_tests/workflow/nodes/test_llm.py b/api/tests/integration_tests/workflow/nodes/test_llm.py index ff119b7482..301268215f 100644 --- a/api/tests/integration_tests/workflow/nodes/test_llm.py +++ b/api/tests/integration_tests/workflow/nodes/test_llm.py @@ -84,6 +84,10 @@ def init_llm_node(config: dict) -> LLMNode: config=config, ) + # Initialize node data + if "data" in config: + node.init_node_data(config["data"]) + return node