File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
examples/tutorials/00_sync/010_multiturn/tests Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -77,19 +77,20 @@ def test_stream_message(self, test_agent):
7777 # Get streaming response
7878 response_gen = test_agent .send_message_streaming (msg )
7979
80- # Collect streaming deltas
80+ # Collect the streaming response
8181 aggregated_content , chunks = collect_streaming_deltas (response_gen )
8282
83+ assert len (chunks ) == 1
84+
8385 # Validate we got content
84- assert len (chunks ) > 0 , "Should receive chunks"
8586 assert len (aggregated_content ) > 0 , "Should receive content"
8687
8788 # Validate that "tennis" appears in the response because that is what our model does
8889 assert "tennis" in aggregated_content .lower ()
8990
9091 # Verify conversation history (only user messages tracked with streaming)
91- history = test_agent .get_conversation_history ()
92- assert len (history ) == (i + 1 ), f"Expected { (i + 1 )} user messages, got { len (history )} "
92+ message_history = test_agent .get_conversation_history ()
93+ assert len (message_history ) == (i + 1 ), f"Expected { (i + 1 )} user messages, got { len (message_history )} "
9394
9495
9596if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments