fix: 修复报告摘要生成并稳定默认端口
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
|
||||
from app.services import task_service
|
||||
from app.config import Settings
|
||||
|
||||
|
||||
def test_task_executor_is_single_worker_thread_pool():
|
||||
@@ -10,3 +11,12 @@ def test_task_executor_is_single_worker_thread_pool():
|
||||
|
||||
def test_run_task_entrypoint_is_synchronous_function():
|
||||
assert task_service.inspect.iscoroutinefunction(task_service.run_task) is False
|
||||
|
||||
|
||||
def test_ai_dependencies_do_not_generate_report_summary_provider_without_ai_config(monkeypatch):
|
||||
monkeypatch.setattr("app.services.task_service.get_settings", lambda: Settings(_env_file=None))
|
||||
|
||||
requester, summary_provider = task_service.build_ai_dependencies()
|
||||
|
||||
assert requester("prompt") == "[]"
|
||||
assert summary_provider is None
|
||||
|
||||
Reference in New Issue
Block a user