mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-11 00:58:30 +00:00
Fix existing test assertions for streaming parameters
- Update mock assertions to include new stream and stream_callback parameters - Fix test_replay_with_context_set_to_nullable assertion - Fix test_crew_guardrail_feedback_in_context side_effect signature - Fix test_task_prompt_includes_expected_output and related test assertions Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
@@ -89,7 +89,7 @@ def test_task_prompt_includes_expected_output():
|
||||
with patch.object(Agent, "execute_task") as execute:
|
||||
execute.return_value = "ok"
|
||||
task.execute_sync(agent=researcher)
|
||||
execute.assert_called_once_with(task=task, context=None, tools=[])
|
||||
execute.assert_called_once_with(task=task, context=None, tools=[], stream=False, stream_callback=None)
|
||||
|
||||
|
||||
def test_task_callback():
|
||||
@@ -181,7 +181,7 @@ def test_execute_with_agent():
|
||||
|
||||
with patch.object(Agent, "execute_task", return_value="ok") as execute:
|
||||
task.execute_sync(agent=researcher)
|
||||
execute.assert_called_once_with(task=task, context=None, tools=[])
|
||||
execute.assert_called_once_with(task=task, context=None, tools=[], stream=False, stream_callback=None)
|
||||
|
||||
|
||||
def test_async_execution():
|
||||
@@ -203,7 +203,7 @@ def test_async_execution():
|
||||
execution = task.execute_async(agent=researcher)
|
||||
result = execution.result()
|
||||
assert result.raw == "ok"
|
||||
execute.assert_called_once_with(task=task, context=None, tools=[])
|
||||
execute.assert_called_once_with(task=task, context=None, tools=[], stream=False, stream_callback=None)
|
||||
|
||||
|
||||
def test_multiple_output_type_error():
|
||||
|
||||
Reference in New Issue
Block a user