diff --git a/tests/test_llama_provider.py b/tests/test_llama_provider.py index d61382df..5b2f19ab 100644 --- a/tests/test_llama_provider.py +++ b/tests/test_llama_provider.py @@ -26,7 +26,7 @@ def test_send_llama_ollama_backend(monkeypatch: pytest.MonkeyPatch) -> None: mock_requests.post.return_value = mock_response with patch("src.ai_client._require_warmed", return_value=mock_requests): result = ai_client._send_llama("system", "user", ".", None, "", False, None, None, None) - assert "hi from ollama" in result + assert result.ok and "hi from ollama" in result.data called_url = mock_requests.post.call_args.args[0] assert called_url == "http://localhost:11434/api/chat" @@ -40,7 +40,7 @@ def test_send_llama_openrouter_backend(monkeypatch: pytest.MonkeyPatch) -> None: ) with patch("src.ai_client._ensure_llama_client", return_value=captured_client) as ensure: result = ai_client._send_llama("system", "user", ".", None, "", False, None, None, None) - assert result == "hi from openrouter" + assert result.ok and result.data == "hi from openrouter" assert ensure.called def test_send_llama_custom_url(monkeypatch: pytest.MonkeyPatch) -> None: @@ -52,7 +52,7 @@ def test_send_llama_custom_url(monkeypatch: pytest.MonkeyPatch) -> None: ) with patch("src.ai_client._ensure_llama_client", return_value=mock_client): result = ai_client._send_llama("system", "user", ".", None, "", False, None, None, None) - assert result == "hi from custom" + assert result.ok and result.data == "hi from custom" def test_llama_model_discovery_unions_ollama_and_openrouter() -> None: from src.ai_client import _list_llama_models