File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
examples/tutorials/00_sync/020_streaming/tests Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,8 @@ def test_send_stream_message(self, test_agent):
8686 # Collect the streaming response
8787 aggregated_content , chunks = collect_streaming_deltas (response_gen )
8888
89- assert len (chunks ) > 1
89+ # this is using the chat_completion_stream, so we will be getting chunks of data
90+ assert len (chunks ) > 1 , "No chunks received in streaming response."
9091
9192 # Validate we got content
9293 assert len (aggregated_content ) > 0 , "Should receive content"
@@ -97,6 +98,9 @@ def test_send_stream_message(self, test_agent):
9798 states = test_agent .client .states .list (task_id = test_agent .task_id )
9899 assert len (states ) == 1
99100
101+ state = states [0 ]
102+ assert state .state is not None
103+ assert state .state .get ("system_prompt" ) == "You are a helpful assistant that can answer questions."
100104 message_history = test_agent .client .messages .list (task_id = test_agent .task_id )
101105 assert len (message_history ) == (i + 1 ) * 2 # user + agent messages
102106
You can’t perform that action at this time.
0 commit comments