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:
Liu An
2025-08-14 12:11:20 +08:00
committed by GitHub
parent 2b3318cd3d
commit b55c3d07dc
2 changed files with 2 additions and 2 deletions

View File

@ -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]}"]

View File

@ -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)