mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 17:38:04 +08:00
refactor(api): continue decoupling dify_graph from API concerns (#33580)
Signed-off-by: -LAN- <laipz8200@outlook.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: WH-2099 <wh2099@pm.me>
This commit is contained in:
@ -942,11 +942,11 @@ class TestDatasetListApiGet:
|
||||
"""Test suite for DatasetListApi.get() endpoint.
|
||||
|
||||
``get`` has no billing decorators but calls ``current_user``,
|
||||
``DatasetService``, ``ProviderManager``, and ``marshal``.
|
||||
``DatasetService``, ``create_plugin_provider_manager``, and ``marshal``.
|
||||
"""
|
||||
|
||||
@patch("controllers.service_api.dataset.dataset.marshal")
|
||||
@patch("controllers.service_api.dataset.dataset.ProviderManager")
|
||||
@patch("controllers.service_api.dataset.dataset.create_plugin_provider_manager")
|
||||
@patch("controllers.service_api.dataset.dataset.current_user")
|
||||
@patch("controllers.service_api.dataset.dataset.DatasetService")
|
||||
def test_list_datasets_success(
|
||||
@ -1044,12 +1044,12 @@ class TestDatasetApiGet:
|
||||
"""Test suite for DatasetApi.get() endpoint.
|
||||
|
||||
``get`` has no billing decorators but calls ``DatasetService``,
|
||||
``ProviderManager``, ``marshal``, and ``current_user``.
|
||||
``create_plugin_provider_manager``, ``marshal``, and ``current_user``.
|
||||
"""
|
||||
|
||||
@patch("controllers.service_api.dataset.dataset.DatasetPermissionService")
|
||||
@patch("controllers.service_api.dataset.dataset.marshal")
|
||||
@patch("controllers.service_api.dataset.dataset.ProviderManager")
|
||||
@patch("controllers.service_api.dataset.dataset.create_plugin_provider_manager")
|
||||
@patch("controllers.service_api.dataset.dataset.current_user")
|
||||
@patch("controllers.service_api.dataset.dataset.DatasetService")
|
||||
def test_get_dataset_success(
|
||||
|
||||
Reference in New Issue
Block a user