(self, mock_theme, runner)
| 866 | |
| 867 | @patch("mcp_cli.main.set_theme") |
| 868 | def test_theme_set(self, mock_theme, runner): |
| 869 | from mcp_cli.main import app |
| 870 | |
| 871 | with patch("mcp_cli.adapters.cli.cli_execute", new_callable=AsyncMock): |
| 872 | with patch("asyncio.run") as mock_asyncio_run: |
| 873 | mock_asyncio_run.side_effect = lambda coro: coro.close() |
| 874 | runner.invoke(app, ["theme", "dark"]) |
| 875 | |
| 876 | |
| 877 | # --------------------------------------------------------------------------- |