mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-22 06:06:40 +08:00
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:
@ -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):
|
||||
|
||||
@ -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):
|
||||
|
||||
@ -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):
|
||||
|
||||
Reference in New Issue
Block a user