mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 12:32:30 +08:00
Fix: Update test assertions and simplify test cases (#9400)
### What problem does this PR solve? - Fix error message assertion in test_update_chunk.py to match new ownership validation - Simplify dataset listing test cases by removing lambda assertions for sorting - Fix actions: https://github.com/infiniflow/ragflow/actions/runs/16885465524/job/47831942553 ### Type of change - [x] Fix 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"Can't find this chunk {chunk_ids[0]}"
|
||||
assert res["message"] == f"You don't own the document {document_id}."
|
||||
|
||||
@ -163,9 +163,9 @@ class TestDatasetsList:
|
||||
[
|
||||
{"orderby": ""},
|
||||
{"orderby": "unknown"},
|
||||
({"orderby": "CREATE_TIME"}, lambda r: (is_sorted(r["data"], "create_time", True))),
|
||||
({"orderby": "UPDATE_TIME"}, lambda r: (is_sorted(r["data"], "update_time", True))),
|
||||
({"orderby": " create_time "}, lambda r: (is_sorted(r["data"], "update_time", True))),
|
||||
{"orderby": "CREATE_TIME"},
|
||||
{"orderby": "UPDATE_TIME"},
|
||||
{"orderby": " create_time "},
|
||||
],
|
||||
ids=["empty", "unknown", "orderby_create_time_upper", "orderby_update_time_upper", "whitespace"],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user