From b4d38944d726407638d5714e8cbc2e1e17525feb Mon Sep 17 00:00:00 2001 From: Mohamed ASSOUKTI Date: Fri, 25 Oct 2024 12:03:09 +0200 Subject: [PATCH] [DERCBOT-1037] TU WIP --- .../src/main/python/server/tests/services/test_rag_chain.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gen-ai/orchestrator-server/src/main/python/server/tests/services/test_rag_chain.py b/gen-ai/orchestrator-server/src/main/python/server/tests/services/test_rag_chain.py index 8b99f93090..17e8be8da3 100644 --- a/gen-ai/orchestrator-server/src/main/python/server/tests/services/test_rag_chain.py +++ b/gen-ai/orchestrator-server/src/main/python/server/tests/services/test_rag_chain.py @@ -141,11 +141,10 @@ async def test_rag_chain( # Call function await execute_rag_chain(query, debug=True) + # Assert that the given observability_setting is used mocked_get_callback_handler_factory.assert_called_once_with( setting=query.observability_setting ) - # Assert LangChain qa chain is created using the expected settings from query - # Assert qa chain is ainvoke()d with the expected settings from query mocked_chain.ainvoke.assert_called_once_with( input=inputs, @@ -159,6 +158,7 @@ async def test_rag_chain( ), debug=mocked_rag_debug_data(query, mocked_rag_answer, mocked_callback, 1), ) + # Assert the rag guard is called mocked_rag_guard.assert_called_once_with( inputs, response )