mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Test: Added test cases for Create Session With Chat Assistant HTTP API (#6902)
### What problem does this PR solve? cover [create session with chat assistant](https://ragflow.io/docs/dev/http_api_reference#create-session-with-chat-assistant) endpoints ### Type of change - [x] add test cases
This commit is contained in:
@ -117,6 +117,7 @@ class TestDatasetsDeletion:
|
||||
res = list_datasets(get_http_api_auth)
|
||||
assert len(res["data"]) == 0
|
||||
|
||||
@pytest.mark.slow
|
||||
def test_concurrent_deletion(self, get_http_api_auth):
|
||||
ids = batch_create_datasets(get_http_api_auth, 100)
|
||||
|
||||
|
||||
@ -337,6 +337,7 @@ class TestDatasetsList:
|
||||
else:
|
||||
assert res["message"] == expected_message
|
||||
|
||||
@pytest.mark.slow
|
||||
def test_concurrent_list(self, get_http_api_auth):
|
||||
with ThreadPoolExecutor(max_workers=5) as executor:
|
||||
futures = [executor.submit(list_datasets, get_http_api_auth) for i in range(100)]
|
||||
|
||||
@ -236,6 +236,7 @@ class TestDatasetUpdate:
|
||||
res = update_dataset(get_http_api_auth, dataset_id, {"unknown_field": 0})
|
||||
assert res["code"] == 100
|
||||
|
||||
@pytest.mark.slow
|
||||
def test_concurrent_update(self, get_http_api_auth, add_dataset_func):
|
||||
dataset_id = add_dataset_func
|
||||
|
||||
|
||||
Reference in New Issue
Block a user