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:
Devin AI
2025-06-04 07:08:26 +00:00
parent 495af081d2
commit 510a4087cd
2 changed files with 5 additions and 5 deletions

View File

@@ -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():