Test: Added test cases for List Sessions With Chat Assistant HTTP API (#6938)

### What problem does this PR solve?

cover [List chat assistant's
sessions](https://ragflow.io/docs/dev/http_api_reference#list-chat-assistants-sessions)
endpoints

### Type of change

- [x] Update test cases
This commit is contained in:
liu an
2025-04-10 17:31:01 +08:00
committed by GitHub
parent 8fb5edd927
commit dc59aba132
6 changed files with 317 additions and 236 deletions

View File

@ -56,3 +56,8 @@ def wait_for(timeout=10, interval=1, error_msg="Timeout"):
return wrapper
return decorator
def is_sorted(data, field, descending=True):
timestamps = [ds[field] for ds in data]
return all(a >= b for a, b in zip(timestamps, timestamps[1:])) if descending else all(a <= b for a, b in zip(timestamps, timestamps[1:]))