Revert "Refactor: dataset / kb API to RESTFul style" (#13646)

Reverts infiniflow/ragflow#13619
This commit is contained in:
Jin Hai
2026-03-17 12:09:48 +08:00
committed by GitHub
parent fdf2d84ffc
commit 986dcf1cc8
53 changed files with 1207 additions and 1721 deletions

View File

@ -409,7 +409,7 @@ def _load_dataset_module(monkeypatch):
rag_nlp_pkg.search = search_mod
module_name = "test_dataset_sdk_routes_unit_module"
module_path = repo_root / "api" / "apps" / "restful_apis" / "dataset_api.py"
module_path = repo_root / "api" / "apps" / "sdk" / "dataset.py"
spec = importlib.util.spec_from_file_location(module_name, module_path)
module = importlib.util.module_from_spec(spec)
module.manager = _DummyManager()
@ -418,7 +418,7 @@ def _load_dataset_module(monkeypatch):
return module
@pytest.mark.p3
@pytest.mark.p2
def test_create_route_error_matrix_unit(monkeypatch):
module = _load_dataset_module(monkeypatch)
req_state = {"name": "kb"}
@ -448,7 +448,7 @@ def test_create_route_error_matrix_unit(monkeypatch):
assert res["message"] == "Database operation failed", res
@pytest.mark.p3
@pytest.mark.p2
def test_delete_route_error_summary_matrix_unit(monkeypatch):
module = _load_dataset_module(monkeypatch)
req_state = {"ids": ["kb-1"]}
@ -476,7 +476,7 @@ def test_delete_route_error_summary_matrix_unit(monkeypatch):
assert res["code"] == module.RetCode.SUCCESS, res
@pytest.mark.p3
@pytest.mark.p2
def test_update_route_branch_matrix_unit(monkeypatch):
module = _load_dataset_module(monkeypatch)
req_state = {"name": "new"}
@ -556,7 +556,7 @@ def test_update_route_branch_matrix_unit(monkeypatch):
assert res["message"] == "Database operation failed", res
@pytest.mark.p3
@pytest.mark.p2
def test_list_knowledge_graph_delete_kg_matrix_unit(monkeypatch):
module = _load_dataset_module(monkeypatch)
@ -629,7 +629,7 @@ def test_list_knowledge_graph_delete_kg_matrix_unit(monkeypatch):
assert res["code"] == module.RetCode.AUTHENTICATION_ERROR, res
@pytest.mark.p3
@pytest.mark.p2
def test_run_trace_graphrag_matrix_unit(monkeypatch):
module = _load_dataset_module(monkeypatch)
@ -705,7 +705,7 @@ def test_run_trace_graphrag_matrix_unit(monkeypatch):
assert res["data"]["id"] == "task-1", res
@pytest.mark.p3
@pytest.mark.p2
def test_run_trace_raptor_matrix_unit(monkeypatch):
module = _load_dataset_module(monkeypatch)