@@ -844,7 +844,7 @@ def teardown_method(self):
844844
845845 def test_get_delete_runtime_revision_operation (self ):
846846 with mock .patch .object (
847- self .client .agent_engines .runtimes . revisions ._api_client , "request"
847+ self .client .agent_engines .revisions ._api_client , "request"
848848 ) as request_mock :
849849 request_mock .return_value = genai_types .HttpResponse (
850850 body = json .dumps (
@@ -854,7 +854,7 @@ def test_get_delete_runtime_revision_operation(self):
854854 }
855855 ),
856856 )
857- operation = self .client .agent_engines .runtimes . revisions ._get_delete_runtime_revision_operation (
857+ operation = self .client .agent_engines .revisions ._get_delete_runtime_revision_operation (
858858 operation_name = _TEST_AGENT_ENGINE_REVISION_OPERATION_NAME ,
859859 )
860860 request_mock .assert_called_with (
@@ -870,7 +870,7 @@ def test_get_delete_runtime_revision_operation(self):
870870
871871 def test_await_operation (self ):
872872 with mock .patch .object (
873- self .client .agent_engines .runtimes . revisions ._api_client , "request"
873+ self .client .agent_engines .revisions ._api_client , "request"
874874 ) as request_mock :
875875 request_mock .return_value = genai_types .HttpResponse (
876876 body = json .dumps (
@@ -882,7 +882,7 @@ def test_await_operation(self):
882882 )
883883 operation = _agent_engines_utils ._await_operation (
884884 operation_name = _TEST_AGENT_ENGINE_REVISION_OPERATION_NAME ,
885- get_operation_fn = self .client .agent_engines .runtimes . revisions ._get_delete_runtime_revision_operation ,
885+ get_operation_fn = self .client .agent_engines .revisions ._get_delete_runtime_revision_operation ,
886886 )
887887 request_mock .assert_called_with (
888888 "get" ,
@@ -895,9 +895,9 @@ def test_await_operation(self):
895895 )
896896
897897 def test_register_api_methods (self ):
898- agent = self .client .agent_engines .runtimes . revisions ._register_api_methods (
898+ agent = self .client .agent_engines .revisions ._register_api_methods (
899899 agent_engine_runtime_revision = _genai_types .AgentEngineRuntimeRevision (
900- api_client = self .client .agent_engines .runtimes . revisions ._api_client ,
900+ api_client = self .client .agent_engines .revisions ._api_client ,
901901 api_resource = _genai_types .ReasoningEngineRuntimeRevision (
902902 spec = _genai_types .ReasoningEngineSpec (
903903 class_methods = [
@@ -932,10 +932,10 @@ def teardown_method(self):
932932
933933 def test_get_runtime_revision (self ):
934934 with mock .patch .object (
935- self .client .agent_engines .runtimes . revisions ._api_client , "request"
935+ self .client .agent_engines .revisions ._api_client , "request"
936936 ) as request_mock :
937937 request_mock .return_value = genai_types .HttpResponse (body = "" )
938- self .client .agent_engines .runtimes . revisions .get (
938+ self .client .agent_engines .revisions .get (
939939 name = _TEST_AGENT_ENGINE_RUNTIME_REVISION_RESOURCE_NAME
940940 )
941941 request_mock .assert_called_with (
@@ -947,12 +947,12 @@ def test_get_runtime_revision(self):
947947
948948 def test_list_runtime_revisions (self ):
949949 with mock .patch .object (
950- self .client .agent_engines .runtimes . revisions ._api_client , "request"
950+ self .client .agent_engines .revisions ._api_client , "request"
951951 ) as request_mock :
952952 request_mock .return_value = genai_types .HttpResponse (body = "" )
953953 expected_query_params = {"filter" : _TEST_LIST_FILTER }
954954 list (
955- self .client .agent_engines .runtimes . revisions .list (
955+ self .client .agent_engines .revisions .list (
956956 name = _TEST_AGENT_ENGINE_RESOURCE_NAME , config = expected_query_params
957957 )
958958 )
@@ -968,7 +968,7 @@ def test_list_runtime_revisions(self):
968968
969969 def test_delete_runtime_revision (self ):
970970 with mock .patch .object (
971- self .client .agent_engines .runtimes . revisions ._api_client , "request"
971+ self .client .agent_engines .revisions ._api_client , "request"
972972 ) as request_mock :
973973 request_mock .side_effect = [
974974 # First call: response to delete.
@@ -984,7 +984,7 @@ def test_delete_runtime_revision(self):
984984 ),
985985 ]
986986
987- self .client .agent_engines .runtimes . revisions .delete (
987+ self .client .agent_engines .revisions .delete (
988988 name = _TEST_AGENT_ENGINE_RUNTIME_REVISION_RESOURCE_NAME
989989 )
990990 request_mock .call_args_list [0 ].assert_called_with (
@@ -1003,12 +1003,12 @@ def test_delete_runtime_revision(self):
10031003
10041004 def test_query_runtime_revision (self ):
10051005 with mock .patch .object (
1006- self .client .agent_engines .runtimes . revisions ._api_client , "request"
1006+ self .client .agent_engines .revisions ._api_client , "request"
10071007 ) as request_mock :
10081008 request_mock .return_value = genai_types .HttpResponse (body = "" )
1009- agent = self .client .agent_engines .runtimes . revisions ._register_api_methods (
1009+ agent = self .client .agent_engines .revisions ._register_api_methods (
10101010 agent_engine_runtime_revision = _genai_types .AgentEngineRuntimeRevision (
1011- api_client = self .client .agent_engines .runtimes . revisions ,
1011+ api_client = self .client .agent_engines .revisions ,
10121012 api_resource = _genai_types .ReasoningEngineRuntimeRevision (
10131013 name = _TEST_AGENT_ENGINE_RUNTIME_REVISION_RESOURCE_NAME ,
10141014 spec = _genai_types .ReasoningEngineSpec (
@@ -1032,10 +1032,10 @@ def test_query_runtime_revision(self):
10321032 )
10331033
10341034 def test_query_agent_engine_async (self ):
1035- agent = self .client .agent_engines .runtimes . revisions ._register_api_methods (
1035+ agent = self .client .agent_engines .revisions ._register_api_methods (
10361036 agent_engine_runtime_revision = _genai_types .AgentEngineRuntimeRevision (
10371037 api_async_client = runtime_revisions .AsyncRuntimeRevisions (
1038- api_client_ = self .client .agent_engines .runtimes . revisions ._api_client
1038+ api_client_ = self .client .agent_engines .revisions ._api_client
10391039 ),
10401040 api_resource = _genai_types .ReasoningEngineRuntimeRevision (
10411041 name = _TEST_AGENT_ENGINE_RUNTIME_REVISION_RESOURCE_NAME ,
@@ -1048,7 +1048,7 @@ def test_query_agent_engine_async(self):
10481048 )
10491049 )
10501050 with mock .patch .object (
1051- self .client .agent_engines .runtimes . revisions ._api_client , "async_request"
1051+ self .client .agent_engines .revisions ._api_client , "async_request"
10521052 ) as request_mock :
10531053 request_mock .return_value = genai_types .HttpResponse (body = "" )
10541054 asyncio .run (agent .async_query (query = _TEST_QUERY_PROMPT ))
@@ -1065,11 +1065,11 @@ def test_query_agent_engine_async(self):
10651065
10661066 def test_query_agent_engine_stream (self ):
10671067 with mock .patch .object (
1068- self .client .agent_engines .runtimes . revisions ._api_client , "request_streamed"
1068+ self .client .agent_engines .revisions ._api_client , "request_streamed"
10691069 ) as request_mock :
1070- agent = self .client .agent_engines .runtimes . revisions ._register_api_methods (
1070+ agent = self .client .agent_engines .revisions ._register_api_methods (
10711071 agent_engine_runtime_revision = _genai_types .AgentEngineRuntimeRevision (
1072- api_client = self .client .agent_engines .runtimes . revisions ,
1072+ api_client = self .client .agent_engines .revisions ,
10731073 api_resource = _genai_types .ReasoningEngineRuntimeRevision (
10741074 name = _TEST_AGENT_ENGINE_RUNTIME_REVISION_RESOURCE_NAME ,
10751075 spec = _genai_types .ReasoningEngineSpec (
@@ -1097,13 +1097,13 @@ async def mock_async_generator():
10971097 yield genai_types .HttpResponse (body = b"" )
10981098
10991099 with mock .patch .object (
1100- self .client .agent_engines .runtimes . revisions ._api_client ,
1100+ self .client .agent_engines .revisions ._api_client ,
11011101 "async_request_streamed" ,
11021102 ) as request_mock :
11031103 request_mock .return_value = mock_async_generator ()
1104- agent = self .client .agent_engines .runtimes . revisions ._register_api_methods (
1104+ agent = self .client .agent_engines .revisions ._register_api_methods (
11051105 agent_engine_runtime_revision = _genai_types .AgentEngineRuntimeRevision (
1106- api_client = self .client .agent_engines .runtimes . revisions ,
1106+ api_client = self .client .agent_engines .revisions ,
11071107 api_resource = _genai_types .ReasoningEngine (
11081108 name = _TEST_AGENT_ENGINE_RUNTIME_REVISION_RESOURCE_NAME ,
11091109 spec = _genai_types .ReasoningEngineSpec (
@@ -1154,8 +1154,7 @@ def teardown_method(self):
11541154
11551155 def test_delete_runtime_revision (self ):
11561156 with mock .patch .object (
1157- self .client .aio .agent_engines .runtimes .revisions ._api_client ,
1158- "async_request" ,
1157+ self .client .aio .agent_engines .revisions ._api_client , "async_request"
11591158 ) as request_mock :
11601159 request_mock .side_effect = [
11611160 # First call: response to delete.
@@ -1171,7 +1170,7 @@ def test_delete_runtime_revision(self):
11711170 ),
11721171 ]
11731172 asyncio .run (
1174- self .client .aio .agent_engines .runtimes . revisions .delete (
1173+ self .client .aio .agent_engines .revisions .delete (
11751174 name = _TEST_AGENT_ENGINE_RUNTIME_REVISION_RESOURCE_NAME
11761175 )
11771176 )
0 commit comments