|
1 | 1 | """Tests for the Vibecore CLI.""" |
2 | 2 |
|
3 | | -from unittest.mock import AsyncMock, MagicMock, patch |
| 3 | +from unittest.mock import ANY, AsyncMock, MagicMock, patch |
4 | 4 |
|
5 | 5 | from typer.testing import CliRunner |
6 | 6 |
|
@@ -107,8 +107,8 @@ def test_cli_continue_with_session( |
107 | 107 | mock_jsonl_class.assert_called_once() |
108 | 108 | call_kwargs = mock_jsonl_class.call_args.kwargs |
109 | 109 | assert call_kwargs["session_id"] == "chat-20250124-150000" |
110 | | - # Verify run_textual was called with prompt (None) and session |
111 | | - mock_vibecore.run_textual.assert_called_once_with(None, session=mock_session) |
| 110 | + # Verify run_textual was called with prompt (None), context, and session |
| 111 | + mock_vibecore.run_textual.assert_called_once_with(None, context=ANY, session=mock_session) |
112 | 112 |
|
113 | 113 | @patch("vibecore.cli.JSONLSession") |
114 | 114 | @patch("vibecore.cli.Vibecore") |
@@ -144,8 +144,8 @@ def test_cli_specific_session(self, mock_mcp_manager_class, mock_vibecore_class, |
144 | 144 | mock_jsonl_class.assert_called_once() |
145 | 145 | call_kwargs = mock_jsonl_class.call_args.kwargs |
146 | 146 | assert call_kwargs["session_id"] == "chat-custom-123" |
147 | | - # Verify run_textual was called with prompt (None) and session |
148 | | - mock_vibecore.run_textual.assert_called_once_with(None, session=mock_session) |
| 147 | + # Verify run_textual was called with prompt (None), context, and session |
| 148 | + mock_vibecore.run_textual.assert_called_once_with(None, context=ANY, session=mock_session) |
149 | 149 |
|
150 | 150 | @patch("vibecore.cli.JSONLSession") |
151 | 151 | @patch("vibecore.cli.Vibecore") |
@@ -181,5 +181,5 @@ def test_cli_no_options(self, mock_mcp_manager_class, mock_vibecore_class, mock_ |
181 | 181 | call_kwargs = mock_jsonl_class.call_args.kwargs |
182 | 182 | # Session ID should start with "chat-" for new sessions |
183 | 183 | assert call_kwargs["session_id"].startswith("chat-") |
184 | | - # Verify run_textual was called with prompt (None) and session |
185 | | - mock_vibecore.run_textual.assert_called_once_with(None, session=mock_session) |
| 184 | + # Verify run_textual was called with prompt (None), context, and session |
| 185 | + mock_vibecore.run_textual.assert_called_once_with(None, context=ANY, session=mock_session) |
0 commit comments