(self, cmd)
| 188 | |
| 189 | @pytest.mark.asyncio |
| 190 | async def test_prompt_basic(self, cmd): |
| 191 | ctx = _make_context() |
| 192 | mock_client = MagicMock() |
| 193 | mock_client.create_completion = AsyncMock( |
| 194 | return_value={"response": "Hello!", "tool_calls": []} |
| 195 | ) |
| 196 | ctx.model_manager.get_client.return_value = mock_client |
| 197 | |
| 198 | with patch(_GET_CONTEXT, return_value=ctx): |
| 199 | with patch("builtins.print") as mock_print: |
| 200 | result = await cmd.execute( |
| 201 | prompt="hi", model_manager=ctx.model_manager |
| 202 | ) |
| 203 | assert result.success is True |
| 204 | assert result.data == "Hello!" |
| 205 | mock_print.assert_called_once_with("Hello!") |
| 206 | |
| 207 | @pytest.mark.asyncio |
| 208 | async def test_stdin_input(self, cmd): |
nothing calls this directly
no test coverage detected