Skip to content

Commit 8fd16eb

Browse files
committed
Fix travis credential issue.
1 parent 785cefc commit 8fd16eb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/google-cloud-speech/unit_tests/test_client.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)