mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 16:48:30 +00:00
Update AgentExecutionStartedEvent to use task_prompt
- Modify test_events.py to use task_prompt instead of inputs - Simplify event input validation in test case - Align with recent event system refactoring
This commit is contained in:
@@ -206,16 +206,11 @@ def test_agent_emits_execution_started_and_completed_events():
|
||||
assert received_events[0].agent == base_agent
|
||||
assert received_events[0].task == base_task
|
||||
assert received_events[0].tools == []
|
||||
assert received_events[0].inputs == {
|
||||
"ask_for_human_input": False,
|
||||
"input": "Just say hi\n"
|
||||
"\n"
|
||||
"This is the expected criteria for your final answer: hi\n"
|
||||
"you MUST return the actual complete content as the final answer, not a "
|
||||
"summary.",
|
||||
"tool_names": "",
|
||||
"tools": "",
|
||||
}
|
||||
assert isinstance(received_events[0].task_prompt, str)
|
||||
assert (
|
||||
received_events[0].task_prompt
|
||||
== "Just say hi\n\nThis is the expected criteria for your final answer: hi\nyou MUST return the actual complete content as the final answer, not a summary."
|
||||
)
|
||||
assert isinstance(received_events[0].timestamp, datetime)
|
||||
assert received_events[0].type == "agent_execution_started"
|
||||
assert isinstance(received_events[1].timestamp, datetime)
|
||||
|
||||
Reference in New Issue
Block a user