Fix test after rebase
This commit is contained in:
parent
8e2829bf0e
commit
20993b48a7
1 changed files with 5 additions and 4 deletions
|
|
@ -46,7 +46,7 @@ def test_add_document_src():
|
|||
|
||||
|
||||
def test_add_document_src_with_title():
|
||||
with patch("haiku.rag.cli.HaikuRAGApp") as mock_app:
|
||||
with patch("haiku.rag.app.HaikuRAGApp") as mock_app:
|
||||
mock_app_instance = MagicMock()
|
||||
mock_app_instance.add_document_from_source = AsyncMock()
|
||||
mock_app.return_value = mock_app_instance
|
||||
|
|
@ -55,9 +55,10 @@ def test_add_document_src_with_title():
|
|||
|
||||
assert result.exit_code == 0
|
||||
mock_app_instance.add_document_from_source.assert_called_once()
|
||||
# Verify title is forwarded
|
||||
await_args = mock_app_instance.add_document_from_source.await_args
|
||||
assert await_args.kwargs.get("title") == "Nice Name"
|
||||
# Verify title is forwarded (inspect call kwargs)
|
||||
_, kwargs = mock_app_instance.add_document_from_source.call_args
|
||||
assert kwargs.get("title") == "Nice Name"
|
||||
assert kwargs.get("source") == "test.txt"
|
||||
|
||||
|
||||
def test_get_document():
|
||||
|
|
|
|||
Loading…
Reference in a new issue