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