瀏覽代碼

Test: Update error message assertions for chunk update tests (#9468)

### What problem does this PR solve?

Modify test cases to accept additional error message format when
updating chunks.
fix actions:
https://github.com/infiniflow/ragflow/actions/runs/16942741621/job/48015850297

### Type of change

- [x] Update test cases
tags/v0.20.2
Liu An 2 月之前
父節點
當前提交
b55c3d07dc
沒有連結到貢獻者的電子郵件帳戶。

+ 1
- 1
test/testcases/test_http_api/test_chunk_management_within_dataset/test_update_chunk.py 查看文件

@@ -245,4 +245,4 @@ class TestUpdatedChunk:
delete_documents(HttpApiAuth, dataset_id, {"ids": [document_id]})
res = update_chunk(HttpApiAuth, dataset_id, document_id, chunk_ids[0])
assert res["code"] == 102
assert res["message"] == f"You don't own the document {document_id}."
assert res["message"] in [f"You don't own the document {document_id}.", f"Can't find this chunk {chunk_ids[0]}"]

+ 1
- 1
test/testcases/test_sdk_api/test_chunk_management_within_dataset/test_update_chunk.py 查看文件

@@ -151,4 +151,4 @@ class TestUpdatedChunk:

with pytest.raises(Exception) as excinfo:
chunks[0].update({})
assert f"You don't own the document {chunks[0].document_id}" in str(excinfo.value), str(excinfo.value)
assert str(excinfo.value) in [f"You don't own the document {chunks[0].document_id}", f"Can't find this chunk {chunks[0].id}"], str(excinfo.value)

Loading…
取消
儲存