test: avoid browser launch in chat controller test

This commit is contained in:
4pmtong 2026-06-16 22:36:14 +08:00
parent 0717c0258f
commit 377589e70d

View file

@ -59,6 +59,10 @@ class TestChatController:
) as mock_step_solve,
patch("app.controller.chat_controller.load_dotenv"),
patch("app.controller.chat_controller.set_current_task_id"),
patch(
"app.controller.chat_controller._prepare_browser_for_request_with_timeout",
new=AsyncMock(return_value=True),
),
patch("pathlib.Path.mkdir"),
patch("pathlib.Path.home", return_value=MagicMock()),
):