File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -266,12 +266,16 @@ def test_async_recognize(self):
266266 self .assertIsNone (operation .metadata )
267267
268268 def test_speech_api_with_gax (self ):
269+ from google .cloud .speech import _gax as MUT
270+ from google .cloud ._testing import _Monkey
269271 from google .cloud .speech .client import GAPICSpeechAPI
270272
271273 creds = _Credentials ()
272274 client = self ._makeOne (credentials = creds , use_gax = True )
273- self .assertIsNone (client ._speech_api )
274- self .assertIsInstance (client .speech_api , GAPICSpeechAPI )
275+
276+ with _Monkey (MUT , SpeechApi = _MockGAPICSpeechAPI ):
277+ self .assertIsNone (client ._speech_api )
278+ self .assertIsInstance (client .speech_api , GAPICSpeechAPI )
275279
276280 def test_speech_api_without_gax (self ):
277281 from google .cloud .speech .client import _JSONSpeechAPI
You can’t perform that action at this time.
0 commit comments