File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
packages/google-cloud-speech/unit_tests Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -266,6 +266,8 @@ def test_async_recognize_no_gax(self):
266266 self .assertIsNone (operation .metadata )
267267
268268 def test_async_recognize_with_gax (self ):
269+ from google .cloud .speech import _gax as MUT
270+ from google .cloud ._testing import _Monkey
269271 from google .cloud import speech
270272
271273 credentials = _Credentials ()
@@ -275,8 +277,9 @@ def test_async_recognize_with_gax(self):
275277 sample = client .sample (source_uri = self .AUDIO_SOURCE_URI ,
276278 encoding = speech .Encoding .LINEAR16 ,
277279 sample_rate = self .SAMPLE_RATE )
278- with self .assertRaises (NotImplementedError ):
279- client .async_recognize (sample )
280+ with _Monkey (MUT , SpeechApi = _MockGAPICSpeechAPI ):
281+ with self .assertRaises (NotImplementedError ):
282+ client .async_recognize (sample )
280283
281284 def test_speech_api_with_gax (self ):
282285 from google .cloud .speech import _gax as MUT
You can’t perform that action at this time.
0 commit comments