mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 12:32:30 +08:00
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
This commit is contained in:
@ -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]}"]
|
||||
|
||||
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user