@@ -899,9 +899,9 @@ def test_parse_client_message_function_response(
899
899
api_client = mock_api_client (vertexai = vertexai ), websocket = mock_websocket
900
900
)
901
901
input = types .FunctionResponse (
902
- id = 'test_id' ,
903
- name = 'test_name' ,
904
- response = {'result' : 'test_response' },
902
+ id = 'test_id' ,
903
+ name = 'test_name' ,
904
+ response = {'result' : 'test_response' },
905
905
)
906
906
result = session ._parse_client_message (input )
907
907
assert 'tool_response' in result
@@ -928,11 +928,11 @@ def test_parse_client_message_tool_response_dict_with_only_response(
928
928
api_client = mock_api_client (vertexai = vertexai ), websocket = mock_websocket
929
929
)
930
930
input = {
931
- 'id' : 'test_id' ,
932
- 'name' : 'test_name' ,
933
- 'response' : {
934
- 'result' : 'test_response' ,
935
- }
931
+ 'id' : 'test_id' ,
932
+ 'name' : 'test_name' ,
933
+ 'response' : {
934
+ 'result' : 'test_response' ,
935
+ },
936
936
}
937
937
result = session ._parse_client_message (input )
938
938
assert 'tool_response' in result
@@ -985,3 +985,19 @@ def test_parse_client_message_realtime_tool_response(
985
985
],
986
986
}
987
987
}
988
+
989
+
990
+ @pytest .mark .asyncio
991
+ async def test_connect_with_http_options_throws_error (
992
+ mock_api_client , mock_websocket
993
+ ):
994
+ with pytest .raises (ValueError , match = 'http_options is not supported' ):
995
+ await live .AsyncLive (mock_api_client ()).connect (
996
+ model = 'models/gemini-pro' ,
997
+ config = types .LiveConnectConfig (http_options = {'proxy' : 'test-proxy' }),
998
+ )
999
+ with pytest .raises (ValueError , match = 'http_options is not supported' ):
1000
+ await live .AsyncLive (mock_api_client ()).connect (
1001
+ model = 'models/gemini-pro' ,
1002
+ config = types .LiveConnectConfig ({'http_options' : {'proxy' : 'test-proxy' }}),
1003
+ )
0 commit comments