mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Test: Add dialog app test suite and update common.py with dialog endpoints (#8729)
### What problem does this PR solve? This commit introduces a comprehensive test suite for the dialog app, including tests for creating, updating, retrieving, listing, and deleting dialogs. Additionally, the common.py file has been updated to include necessary API endpoints and helper functions for dialog operations. ### Type of change - [x] Add test cases
This commit is contained in:
@ -21,6 +21,7 @@ from common import (
|
||||
batch_create_datasets,
|
||||
bulk_upload_documents,
|
||||
delete_chunks,
|
||||
delete_dialogs,
|
||||
list_chunks,
|
||||
list_documents,
|
||||
list_kbs,
|
||||
@ -97,6 +98,14 @@ def clear_datasets(request: FixtureRequest, WebApiAuth: RAGFlowWebApiAuth):
|
||||
request.addfinalizer(cleanup)
|
||||
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
def clear_dialogs(request, WebApiAuth):
|
||||
def cleanup():
|
||||
delete_dialogs(WebApiAuth)
|
||||
|
||||
request.addfinalizer(cleanup)
|
||||
|
||||
|
||||
@pytest.fixture(scope="class")
|
||||
def add_dataset(request: FixtureRequest, WebApiAuth: RAGFlowWebApiAuth) -> str:
|
||||
def cleanup():
|
||||
|
||||
Reference in New Issue
Block a user