Skip to content

Commit e24e96a

Browse files
committed
Fix travis creds.
1 parent 5a6f7be commit e24e96a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

speech/unit_tests/test_client.py

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

0 commit comments

Comments
 (0)