diff --git a/tests/tools/test_exec_platform.py b/tests/tools/test_exec_platform.py index 890c8b29b..637a3ec60 100644 --- a/tests/tools/test_exec_platform.py +++ b/tests/tools/test_exec_platform.py @@ -160,7 +160,7 @@ class TestSpawnWindows: with ( patch("nanobot.agent.tools.shell._IS_WINDOWS", True), - patch("nanobot.agent.tools.shell.sys.platform", "win32"), + patch("nanobot.agent.tools.shell.sys", MagicMock(platform="win32")), patch("asyncio.create_subprocess_exec", new_callable=AsyncMock) as mock_exec, patch.object(ExecTool, "_create_windows_job", return_value=job), pytest.raises(OSError, match="OpenProcess failed"),