Test: update test cases per pr #6095 to fix issue #6039 (#6143)

### What problem does this PR solve?

update test case per pr #6095 to fix issue #6039

### Type of change

- [x] update test case
This commit is contained in:
liu an 2025-03-17 10:49:40 +08:00 committed by GitHub
parent 634e7a41c5
commit 7f701a5756
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -140,9 +140,7 @@ class TestUploadDocuments:
fp = create_txt_file(tmp_path / f"{'a' * (DOCUMENT_NAME_LIMIT - 3)}.txt") fp = create_txt_file(tmp_path / f"{'a' * (DOCUMENT_NAME_LIMIT - 3)}.txt")
res = upload_documnets(get_http_api_auth, ids[0], [fp]) res = upload_documnets(get_http_api_auth, ids[0], [fp])
assert res["code"] == 101 assert res["code"] == 101
assert ( assert res["message"] == "File name should be less than 128 bytes."
res["message"].find("128") >= 0
)
def test_invalid_dataset_id(self, get_http_api_auth, tmp_path): def test_invalid_dataset_id(self, get_http_api_auth, tmp_path):
fp = create_txt_file(tmp_path / "ragflow_test.txt") fp = create_txt_file(tmp_path / "ragflow_test.txt")
@ -206,7 +204,6 @@ class TestUploadDocuments:
res = list_dataset(get_http_api_auth, {"id": ids[0]}) res = list_dataset(get_http_api_auth, {"id": ids[0]})
assert res["data"][0]["document_count"] == expected_document_count assert res["data"][0]["document_count"] == expected_document_count
@pytest.mark.xfail
def test_concurrent_upload(self, get_http_api_auth, tmp_path): def test_concurrent_upload(self, get_http_api_auth, tmp_path):
ids = create_datasets(get_http_api_auth, 1) ids = create_datasets(get_http_api_auth, 1)