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:
liu an
2025-04-09 17:21:48 +08:00
committed by GitHub
parent 9d9f2dacd2
commit ae107f31d9
18 changed files with 237 additions and 42 deletions

View File

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

View File

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

View File

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