Change knowledge base to dataset (#11976)

### What problem does this PR solve?

As title

### Type of change

- [x] Refactoring

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2025-12-17 10:03:33 +08:00
committed by GitHub
parent 4d46726eb7
commit 30019dab9f
35 changed files with 92 additions and 92 deletions

View File

@ -60,7 +60,7 @@ class TestDocumentCreate:
def test_invalid_kb_id(self, WebApiAuth):
res = create_document(WebApiAuth, {"name": "ragflow_test.txt", "kb_id": "invalid_kb_id"})
assert res["code"] == 102, res
assert res["message"] == "Can't find this knowledgebase!", res
assert res["message"] == "Can't find this dataset!", res
@pytest.mark.p3
def test_filename_special_characters(self, WebApiAuth, add_dataset_func):

View File

@ -51,7 +51,7 @@ class TestDocumentsList:
"kb_id, expected_code, expected_message",
[
("", 101, 'Lack of "KB ID"'),
("invalid_dataset_id", 103, "Only owner of knowledgebase authorized for this operation."),
("invalid_dataset_id", 103, "Only owner of dataset authorized for this operation."),
],
)
def test_invalid_dataset_id(self, WebApiAuth, kb_id, expected_code, expected_message):

View File

@ -136,7 +136,7 @@ class TestDocumentsUpload:
fp = create_txt_file(tmp_path / "ragflow_test.txt")
res = upload_documents(WebApiAuth, {"kb_id": "invalid_kb_id"}, [fp])
assert res["code"] == 100, res
assert res["message"] == """LookupError("Can't find this knowledgebase!")""", res
assert res["message"] == """LookupError("Can't find this dataset!")""", res
@pytest.mark.p2
def test_duplicate_files(self, WebApiAuth, add_dataset_func, tmp_path):