From 5d0805d9d1471b20a30d8d16a48068bda2c7102a Mon Sep 17 00:00:00 2001 From: Xubin Ren <52506698+Re-bin@users.noreply.github.com> Date: Tue, 11 Aug 2026 00:04:01 +0900 Subject: [PATCH] test(plugins): isolate setup process --- tests/webui/test_mcp_presets_api.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/webui/test_mcp_presets_api.py b/tests/webui/test_mcp_presets_api.py index 93f9775c0..682f57ae7 100644 --- a/tests/webui/test_mcp_presets_api.py +++ b/tests/webui/test_mcp_presets_api.py @@ -2,6 +2,7 @@ from __future__ import annotations import asyncio import json +import subprocess from pathlib import Path import pytest @@ -113,6 +114,10 @@ def test_agent_plugin_reuses_mcp_catalog_and_runtime_action( ) -> None: _use_config(tmp_path, monkeypatch) _write_agent_plugin(load_config().workspace_path) + monkeypatch.setattr( + "nanobot.agent.plugins.subprocess.run", + lambda command, **_: subprocess.CompletedProcess(command, 0, "", ""), + ) row = next(item for item in mcp_presets_payload()["presets"] if item["source"] == "agent-plugin") assert row["name"] == "plugin-desktop"