@@ -855,7 +855,7 @@ async def test_on_message_send_limit_history():
855855 configuration = MessageSendConfiguration (
856856 blocking = True ,
857857 accepted_output_modes = ['text/plain' ],
858- history_length = 0 ,
858+ history_length = 1 ,
859859 ),
860860 )
861861
@@ -866,13 +866,13 @@ async def test_on_message_send_limit_history():
866866 # verify that history_length is honored
867867 assert result is not None
868868 assert isinstance (result , Task )
869- assert result .history is not None and len (result .history ) == 0
869+ assert result .history is not None and len (result .history ) == 1
870870 assert result .status .state == TaskState .completed
871871
872872 # verify that history is still persisted to the store
873873 task = await task_store .get (result .id )
874874 assert task is not None
875- assert task .history is not None and len (task .history ) > 0
875+ assert task .history is not None and len (task .history ) > 1
876876
877877
878878@pytest .mark .asyncio
@@ -892,7 +892,8 @@ async def test_on_task_get_limit_history():
892892 parts = [Part (root = TextPart (text = 'Hi' ))],
893893 ),
894894 configuration = MessageSendConfiguration (
895- blocking = True , accepted_output_modes = ['text/plain' ]
895+ blocking = True ,
896+ accepted_output_modes = ['text/plain' ],
896897 ),
897898 )
898899
@@ -904,14 +905,14 @@ async def test_on_task_get_limit_history():
904905 assert isinstance (result , Task )
905906
906907 get_task_result = await request_handler .on_get_task (
907- TaskQueryParams (id = result .id , history_length = 0 ),
908+ TaskQueryParams (id = result .id , history_length = 1 ),
908909 create_server_call_context (),
909910 )
910911 assert get_task_result is not None
911912 assert isinstance (get_task_result , Task )
912913 assert (
913914 get_task_result .history is not None
914- and len (get_task_result .history ) == 0
915+ and len (get_task_result .history ) == 1
915916 )
916917
917918
0 commit comments