From 263f6dfc05ddb83cdf4f43197b1216f054f55cd2 Mon Sep 17 00:00:00 2001 From: Yongtao Huang Date: Thu, 10 Jul 2025 01:12:15 +0800 Subject: [PATCH] Rm unused import and var --- api/tests/integration_tests/vdb/couchbase/test_couchbase.py | 1 - api/tests/integration_tests/vdb/matrixone/test_matrixone.py | 1 - api/tests/integration_tests/vdb/opengauss/test_opengauss.py | 1 - .../integration_tests/vdb/pyvastbase/test_vastbase_vector.py | 1 - api/tests/integration_tests/workflow/nodes/test_llm.py | 2 -- api/tests/unit_tests/factories/test_variable_factory.py | 2 -- 6 files changed, 8 deletions(-) diff --git a/api/tests/integration_tests/vdb/couchbase/test_couchbase.py b/api/tests/integration_tests/vdb/couchbase/test_couchbase.py index d76c34ba0e..eef1ee4e75 100644 --- a/api/tests/integration_tests/vdb/couchbase/test_couchbase.py +++ b/api/tests/integration_tests/vdb/couchbase/test_couchbase.py @@ -4,7 +4,6 @@ import time from core.rag.datasource.vdb.couchbase.couchbase_vector import CouchbaseConfig, CouchbaseVector from tests.integration_tests.vdb.test_vector_store import ( AbstractVectorTest, - get_example_text, setup_mock_redis, ) diff --git a/api/tests/integration_tests/vdb/matrixone/test_matrixone.py b/api/tests/integration_tests/vdb/matrixone/test_matrixone.py index c8b19ef3ad..c4056db63e 100644 --- a/api/tests/integration_tests/vdb/matrixone/test_matrixone.py +++ b/api/tests/integration_tests/vdb/matrixone/test_matrixone.py @@ -1,7 +1,6 @@ from core.rag.datasource.vdb.matrixone.matrixone_vector import MatrixoneConfig, MatrixoneVector from tests.integration_tests.vdb.test_vector_store import ( AbstractVectorTest, - get_example_text, setup_mock_redis, ) diff --git a/api/tests/integration_tests/vdb/opengauss/test_opengauss.py b/api/tests/integration_tests/vdb/opengauss/test_opengauss.py index f2013848bf..2a1129493c 100644 --- a/api/tests/integration_tests/vdb/opengauss/test_opengauss.py +++ b/api/tests/integration_tests/vdb/opengauss/test_opengauss.py @@ -5,7 +5,6 @@ import psycopg2 # type: ignore from core.rag.datasource.vdb.opengauss.opengauss import OpenGauss, OpenGaussConfig from tests.integration_tests.vdb.test_vector_store import ( AbstractVectorTest, - get_example_text, setup_mock_redis, ) diff --git a/api/tests/integration_tests/vdb/pyvastbase/test_vastbase_vector.py b/api/tests/integration_tests/vdb/pyvastbase/test_vastbase_vector.py index 3d7873442b..02931fef5a 100644 --- a/api/tests/integration_tests/vdb/pyvastbase/test_vastbase_vector.py +++ b/api/tests/integration_tests/vdb/pyvastbase/test_vastbase_vector.py @@ -1,7 +1,6 @@ from core.rag.datasource.vdb.pyvastbase.vastbase_vector import VastbaseVector, VastbaseVectorConfig from tests.integration_tests.vdb.test_vector_store import ( AbstractVectorTest, - get_example_text, setup_mock_redis, ) diff --git a/api/tests/integration_tests/workflow/nodes/test_llm.py b/api/tests/integration_tests/workflow/nodes/test_llm.py index 389d1071f3..ce4ee5aeca 100644 --- a/api/tests/integration_tests/workflow/nodes/test_llm.py +++ b/api/tests/integration_tests/workflow/nodes/test_llm.py @@ -113,8 +113,6 @@ def test_execute_llm(flask_req_ctx): }, ) - credentials = {"openai_api_key": os.environ.get("OPENAI_API_KEY")} - # Create a proper LLM result with real entities mock_usage = LLMUsage( prompt_tokens=30, diff --git a/api/tests/unit_tests/factories/test_variable_factory.py b/api/tests/unit_tests/factories/test_variable_factory.py index 14505df0ef..edd4c5e93e 100644 --- a/api/tests/unit_tests/factories/test_variable_factory.py +++ b/api/tests/unit_tests/factories/test_variable_factory.py @@ -14,9 +14,7 @@ from core.variables import ( ArrayStringVariable, FloatVariable, IntegerVariable, - ObjectSegment, SecretVariable, - SegmentType, StringVariable, ) from core.variables.exc import VariableError