update tests

This commit is contained in:
2026-03-05 14:42:55 +08:00
parent 38b0d5df15
commit 080631af31
2 changed files with 5 additions and 5 deletions

View File

@@ -30,7 +30,7 @@ except Exception as e:
# <<< Paste your running FastAPI base url here >>> # <<< 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 # Params

View File

@@ -38,7 +38,7 @@ def _fake_build_fn(
def test_registry_route_lifecycle(monkeypatch, tmp_path): def test_registry_route_lifecycle(monkeypatch, tmp_path):
registry_path = tmp_path / "pipeline_registry.json" 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) monkeypatch.setitem(front_apis.GRAPH_BUILD_FNCS, "routing", _fake_build_fn)
client = TestClient(front_apis.app) 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["pipeline_id"] == "xiaozhan"
assert create_data["graph_id"] == "routing" assert create_data["graph_id"] == "routing"
assert create_data["llm_name"] == "qwen-plus" 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") list_resp = client.get("/v1/pipelines")
assert list_resp.status_code == 200, list_resp.text 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): def test_registry_api_key_policy_lifecycle(monkeypatch, tmp_path):
registry_path = tmp_path / "pipeline_registry.json" 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) monkeypatch.setitem(front_apis.GRAPH_BUILD_FNCS, "routing", _fake_build_fn)
client = TestClient(front_apis.app) client = TestClient(front_apis.app)
@@ -136,4 +136,4 @@ def test_registry_api_key_policy_lifecycle(monkeypatch, tmp_path):
delete_data = delete_resp.json() delete_data = delete_resp.json()
assert delete_data["api_key"] == "sk-test-key" assert delete_data["api_key"] == "sk-test-key"
assert delete_data["status"] == "deleted" assert delete_data["status"] == "deleted"
assert delete_data["reload_required"] is True assert delete_data["reload_required"] is False