File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
tests/server/apps/jsonrpc Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,23 @@ def test_create_a2a_fastapi_app_with_missing_deps_raises_importerror(
7575 ):
7676 _app = A2AFastAPIApplication (** mock_app_params )
7777
78+ def test_stream_send_timeout_parameter (self , mock_app_params : dict ):
79+ try :
80+ app_default = A2AFastAPIApplication (** mock_app_params )
81+ assert app_default .stream_send_timeout is None
82+
83+ app_custom = A2AFastAPIApplication (
84+ ** mock_app_params , stream_send_timeout = 30.0
85+ )
86+ assert app_custom .stream_send_timeout == 30.0
87+
88+ app_none = A2AFastAPIApplication (
89+ ** mock_app_params , stream_send_timeout = None
90+ )
91+ assert app_none .stream_send_timeout is None
92+ except ImportError :
93+ pytest .skip ('FastAPI dependencies not available' )
94+
7895
7996if __name__ == '__main__' :
8097 pytest .main ([__file__ ])
Original file line number Diff line number Diff line change @@ -77,6 +77,23 @@ def test_create_a2a_starlette_app_with_missing_deps_raises_importerror(
7777 ):
7878 _app = A2AStarletteApplication (** mock_app_params )
7979
80+ def test_stream_send_timeout_parameter (self , mock_app_params : dict ):
81+ try :
82+ app_default = A2AStarletteApplication (** mock_app_params )
83+ assert app_default .stream_send_timeout is None
84+
85+ app_custom = A2AStarletteApplication (
86+ ** mock_app_params , stream_send_timeout = 30.0
87+ )
88+ assert app_custom .stream_send_timeout == 30.0
89+
90+ app_none = A2AStarletteApplication (
91+ ** mock_app_params , stream_send_timeout = None
92+ )
93+ assert app_none .stream_send_timeout is None
94+ except ImportError :
95+ pytest .skip ('Starlette dependencies not available' )
96+
8097
8198if __name__ == '__main__' :
8299 pytest .main ([__file__ ])
You can’t perform that action at this time.
0 commit comments