From 35e8bac9f25e7c84c29972975fa9d4c904f83b32 Mon Sep 17 00:00:00 2001 From: Boundless Asura Date: Tue, 10 Oct 2023 12:53:55 +0530 Subject: [PATCH] fixes --- tests/unit_tests/apm/test_call_log_helper.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/unit_tests/apm/test_call_log_helper.py b/tests/unit_tests/apm/test_call_log_helper.py index 6d1eed7e3..afd4eefb4 100644 --- a/tests/unit_tests/apm/test_call_log_helper.py +++ b/tests/unit_tests/apm/test_call_log_helper.py @@ -55,13 +55,12 @@ def test_fetch_data_success(call_log_helper, mock_session): model='test_model', org_id=1 )] - agent = Agent(name='test_agent') - tool = Tool(name='test_tool', toolkit_id=1) - toolkit = Toolkit(name='test_toolkit') + agents = [Agent(name='test_agent')] + tools = [Tool(name='test_tool', toolkit_id=1)] + toolkits = [Toolkit(name='test_toolkit')] # setup return values for the mock methods - mock_session.query().filter().first.side_effect = [summary_result, agent, tool, toolkit] - mock_session.query().filter().all.return_value = runs + mock_session.query().filter().first.side_effect = [summary_result, runs, agents, toolkits, tools] result = call_log_helper.fetch_data('test_model')