From 080631af31b9b3aac12420507eb3aed7a100e341 Mon Sep 17 00:00:00 2001 From: goulustis Date: Thu, 5 Mar 2026 14:42:55 +0800 Subject: [PATCH] update tests --- tests/test_dashscope_client.py | 2 +- tests/test_front_apis_registry.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_dashscope_client.py b/tests/test_dashscope_client.py index fb1dbbe..48cb69f 100644 --- a/tests/test_dashscope_client.py +++ b/tests/test_dashscope_client.py @@ -30,7 +30,7 @@ except Exception as e: # <<< Paste your running FastAPI base url here >>> -BASE_URL = os.getenv("DS_BASE_URL", "http://127.0.0.1:8588/api/") +BASE_URL = os.getenv("DS_BASE_URL", "http://127.0.0.1:8500/api/") # Params diff --git a/tests/test_front_apis_registry.py b/tests/test_front_apis_registry.py index d4e8486..2ec7121 100644 --- a/tests/test_front_apis_registry.py +++ b/tests/test_front_apis_registry.py @@ -38,7 +38,7 @@ def _fake_build_fn( def test_registry_route_lifecycle(monkeypatch, tmp_path): registry_path = tmp_path / "pipeline_registry.json" - monkeypatch.setattr(front_apis, "_PIPELINE_REGISTRY_PATH", str(registry_path)) + monkeypatch.setattr(front_apis, "PIPELINE_REGISTRY_PATH", str(registry_path)) monkeypatch.setitem(front_apis.GRAPH_BUILD_FNCS, "routing", _fake_build_fn) client = TestClient(front_apis.app) @@ -60,7 +60,7 @@ def test_registry_route_lifecycle(monkeypatch, tmp_path): assert create_data["pipeline_id"] == "xiaozhan" assert create_data["graph_id"] == "routing" assert create_data["llm_name"] == "qwen-plus" - assert create_data["reload_required"] is True + assert create_data["reload_required"] is False list_resp = client.get("/v1/pipelines") assert list_resp.status_code == 200, list_resp.text @@ -91,7 +91,7 @@ def test_registry_route_lifecycle(monkeypatch, tmp_path): def test_registry_api_key_policy_lifecycle(monkeypatch, tmp_path): registry_path = tmp_path / "pipeline_registry.json" - monkeypatch.setattr(front_apis, "_PIPELINE_REGISTRY_PATH", str(registry_path)) + monkeypatch.setattr(front_apis, "PIPELINE_REGISTRY_PATH", str(registry_path)) monkeypatch.setitem(front_apis.GRAPH_BUILD_FNCS, "routing", _fake_build_fn) client = TestClient(front_apis.app) @@ -136,4 +136,4 @@ def test_registry_api_key_policy_lifecycle(monkeypatch, tmp_path): delete_data = delete_resp.json() assert delete_data["api_key"] == "sk-test-key" assert delete_data["status"] == "deleted" - assert delete_data["reload_required"] is True + assert delete_data["reload_required"] is False