File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -338,14 +338,24 @@ def speech_api():
338338 self .assertIsNone (operation .response )
339339
340340 def test_speech_api_with_gax (self ):
341+ from google .cloud ._testing import _Monkey
342+
343+ from google .cloud .speech import _gax
341344 from google .cloud .speech .client import GAPICSpeechAPI
342345
343346 creds = _Credentials ()
344347 client = self ._makeOne (credentials = creds , use_gax = True )
345348 client .connection = _Connection ()
346349 client .connection .credentials = creds
347350
351+ def speech_api ():
352+ return _MockGAPICSpeechAPI ()
353+
348354 self .assertIsNone (client ._speech_api )
355+
356+ with _Monkey (_gax , SpeechApi = speech_api ):
357+ client ._speech_api = _gax .GAPICSpeechAPI (client )
358+
349359 self .assertIsInstance (client .speech_api , GAPICSpeechAPI )
350360
351361 def test_speech_api_without_gax (self ):
You can’t perform that action at this time.
0 commit comments