refactor(backend): 重构后端
This commit is contained in:
1 parent
c8054476c1
commit
bba6e6f221
32 files changed
+252
-296
No files matched your search
@@ -1025,7 +1025,7 @@ def test_file_check_dify_chat_inputs(app):
|
||||
def test_file_check_dify_chat_inputs_without_extra_task_id(app):
|
||||
import pytest
|
||||
|
||||
from app.errors import ValidationError
|
||||
from app.core.errors import ValidationError
|
||||
from app.services.file_check_tools.dify_inputs import (
|
||||
FILE_CHECK_TASK_ID_MISSING_CODE,
|
||||
build_file_check_dify_inputs,
|
||||
@@ -1046,7 +1046,7 @@ def test_file_check_dify_chat_inputs_without_extra_task_id(app):
|
||||
def test_file_check_dify_inputs_raises_when_capability_without_schedule_task_id(app):
|
||||
import pytest
|
||||
|
||||
from app.errors import ValidationError
|
||||
from app.core.errors import ValidationError
|
||||
from app.services.file_check_tools.agent_resolver import (
|
||||
agent_declares_file_check_progress,
|
||||
is_file_check_chat_agent,
|
||||
@@ -1100,7 +1100,7 @@ def test_chat_completions_rejects_missing_file_check_task_id(app, client, mocker
|
||||
g.current_user = user
|
||||
return user
|
||||
|
||||
mocker.patch('app.decorators._get_current_user', side_effect=mock_get_user)
|
||||
mocker.patch('app.core.decorators._get_current_user', side_effect=mock_get_user)
|
||||
mocker.patch('app.models.Agent.query').get.return_value = misconfigured
|
||||
mock_post = mocker.patch('requests.post')
|
||||
mock_post.side_effect = AssertionError('Dify must not be called when task_id is missing')
|
||||
|
||||
Reference in new issue
Block a user