From f25a949758f2cedf417d5edb0353985df58c0db0 Mon Sep 17 00:00:00 2001 From: Yiorgis Gozadinos Date: Thu, 11 Dec 2025 16:05:49 +0200 Subject: [PATCH] Fix tests --- tests/test_app.py | 6 +++--- tests/test_cli.py | 30 +++++++++++++++++++++++++----- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/tests/test_app.py b/tests/test_app.py index b7743605..0d848761 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -304,7 +304,7 @@ async def test_ask_without_cite(app: HaikuRAGApp, monkeypatch): with patch("haiku.rag.app.HaikuRAG", return_value=mock_client): await app.ask("test question") - mock_client.ask.assert_called_once_with("test question") + mock_client.ask.assert_called_once_with("test question", filter=None) @pytest.mark.asyncio @@ -333,7 +333,7 @@ async def test_ask_with_cite(app: HaikuRAGApp, monkeypatch): with patch("haiku.rag.app.HaikuRAG", return_value=mock_client): await app.ask("test question", cite=True) - mock_client.ask.assert_called_once_with("test question") + mock_client.ask.assert_called_once_with("test question", filter=None) # Verify print was called (once for answer, once for citations) assert mock_print.call_count >= 1 @@ -353,7 +353,7 @@ async def test_ask_with_verbose(app: HaikuRAGApp, monkeypatch): with patch("haiku.rag.app.HaikuRAG", return_value=mock_client): await app.ask("test question", verbose=True) - mock_client.ask.assert_called_once_with("test question") + mock_client.ask.assert_called_once_with("test question", filter=None) @pytest.mark.asyncio diff --git a/tests/test_cli.py b/tests/test_cli.py index 0fbdc05e..ac7da1fc 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -279,7 +279,11 @@ def test_ask(): assert result.exit_code == 0 mock_app_instance.ask.assert_called_once_with( - question="What is Python?", cite=False, deep=False, verbose=False + question="What is Python?", + cite=False, + deep=False, + verbose=False, + filter=None, ) @@ -293,7 +297,11 @@ def test_ask_with_cite(): assert result.exit_code == 0 mock_app_instance.ask.assert_called_once_with( - question="What is Python?", cite=True, deep=False, verbose=False + question="What is Python?", + cite=True, + deep=False, + verbose=False, + filter=None, ) @@ -307,7 +315,11 @@ def test_ask_with_deep(): assert result.exit_code == 0 mock_app_instance.ask.assert_called_once_with( - question="What is Python?", cite=False, deep=True, verbose=False + question="What is Python?", + cite=False, + deep=True, + verbose=False, + filter=None, ) @@ -321,7 +333,11 @@ def test_ask_with_deep_and_cite(): assert result.exit_code == 0 mock_app_instance.ask.assert_called_once_with( - question="What is Python?", cite=True, deep=True, verbose=False + question="What is Python?", + cite=True, + deep=True, + verbose=False, + filter=None, ) @@ -335,7 +351,11 @@ def test_ask_with_deep_and_verbose(): assert result.exit_code == 0 mock_app_instance.ask.assert_called_once_with( - question="What is Python?", cite=False, deep=True, verbose=True + question="What is Python?", + cite=False, + deep=True, + verbose=True, + filter=None, )