@@ -87,15 +87,15 @@ def _make_one(self, *args, **kw):
8787 def test_ctor (self ):
8888 creds = _make_credentials ()
8989 http = object ()
90- client = self ._make_one (credentials = creds , http = http )
90+ client = self ._make_one (credentials = creds , _http = http )
9191 self .assertTrue (client ._credentials is creds )
9292 self .assertTrue (client ._http is http )
9393
94- def test_ctor_use_gax_preset (self ):
94+ def test_ctor_use_grpc_preset (self ):
9595 creds = _make_credentials ()
9696 http = object ()
97- client = self ._make_one (credentials = creds , http = http , use_gax = True )
98- self .assertTrue (client ._use_gax )
97+ client = self ._make_one (credentials = creds , _http = http , _use_grpc = True )
98+ self .assertTrue (client ._use_grpc )
9999
100100 def test_create_sample_from_client (self ):
101101 from google .cloud import speech
@@ -148,7 +148,7 @@ def test_sync_recognize_content_with_optional_params_no_gax(self):
148148 }
149149 }
150150 credentials = _make_credentials ()
151- client = self ._make_one (credentials = credentials , use_gax = False )
151+ client = self ._make_one (credentials = credentials , _use_grpc = False )
152152 speech_api = client .speech_api
153153 connection = _Connection (SYNC_RECOGNIZE_RESPONSE )
154154 speech_api ._connection = connection
@@ -196,7 +196,7 @@ def test_sync_recognize_source_uri_without_optional_params_no_gax(self):
196196 },
197197 }
198198 credentials = _make_credentials ()
199- client = self ._make_one (credentials = credentials , use_gax = False )
199+ client = self ._make_one (credentials = credentials , _use_grpc = False )
200200 speech_api = client .speech_api
201201 connection = _Connection (SYNC_RECOGNIZE_RESPONSE )
202202 speech_api ._connection = connection
@@ -233,7 +233,7 @@ def test_sync_recognize_with_empty_results_no_gax(self):
233233 from tests .unit ._fixtures import SYNC_RECOGNIZE_EMPTY_RESPONSE
234234
235235 credentials = _make_credentials ()
236- client = self ._make_one (credentials = credentials , use_gax = False )
236+ client = self ._make_one (credentials = credentials , _use_grpc = False )
237237 speech_api = client .speech_api
238238 speech_api ._connection = _Connection (SYNC_RECOGNIZE_EMPTY_RESPONSE )
239239
@@ -251,7 +251,7 @@ def test_sync_recognize_with_empty_results_gax(self):
251251 from google .cloud .speech import _gax
252252
253253 credentials = _make_credentials ()
254- client = self ._make_one (credentials = credentials , use_gax = True )
254+ client = self ._make_one (credentials = credentials , _use_grpc = True )
255255 client ._credentials = credentials
256256
257257 channel_args = []
@@ -293,7 +293,7 @@ def test_sync_recognize_with_gax(self):
293293 from google .cloud .speech import _gax
294294
295295 creds = _make_credentials ()
296- client = self ._make_one (credentials = creds , use_gax = True )
296+ client = self ._make_one (credentials = creds , _use_grpc = True )
297297 client ._credentials = creds
298298
299299 alternatives = [{
@@ -354,7 +354,7 @@ def test_async_supported_encodings(self):
354354 from google .cloud import speech
355355
356356 credentials = _make_credentials ()
357- client = self ._make_one (credentials = credentials , use_gax = True )
357+ client = self ._make_one (credentials = credentials , _use_grpc = True )
358358
359359 sample = client .sample (
360360 source_uri = self .AUDIO_SOURCE_URI , encoding = speech .Encoding .FLAC ,
@@ -370,7 +370,7 @@ def test_async_recognize_no_gax(self):
370370 RETURNED = ASYNC_RECOGNIZE_RESPONSE
371371
372372 credentials = _make_credentials ()
373- client = self ._make_one (credentials = credentials , use_gax = False )
373+ client = self ._make_one (credentials = credentials , _use_grpc = False )
374374 speech_api = client .speech_api
375375 speech_api ._connection = _Connection (RETURNED )
376376
@@ -393,7 +393,7 @@ def test_async_recognize_with_gax(self):
393393 from google .cloud .speech .operation import Operation
394394
395395 credentials = _make_credentials ()
396- client = self ._make_one (credentials = credentials , use_gax = True )
396+ client = self ._make_one (credentials = credentials , _use_grpc = True )
397397 client ._credentials = credentials
398398
399399 channel_args = []
@@ -433,7 +433,7 @@ def test_streaming_depends_on_gax(self):
433433 from google .cloud import speech
434434
435435 credentials = _make_credentials ()
436- client = self ._make_one (credentials = credentials , use_gax = False )
436+ client = self ._make_one (credentials = credentials , _use_grpc = False )
437437 sample = client .sample (
438438 content = self .AUDIO_CONTENT , encoding = speech .Encoding .LINEAR16 ,
439439 sample_rate = self .SAMPLE_RATE )
@@ -673,7 +673,7 @@ def test_speech_api_with_gax(self):
673673 from google .cloud .speech import _gax
674674
675675 creds = _make_credentials ()
676- client = self ._make_one (credentials = creds , use_gax = True )
676+ client = self ._make_one (credentials = creds , _use_grpc = True )
677677 client ._credentials = creds
678678
679679 channel_args = []
@@ -705,7 +705,7 @@ def test_speech_api_without_gax(self):
705705 from google .cloud .speech ._http import HTTPSpeechAPI
706706
707707 creds = _make_credentials ()
708- client = self ._make_one (credentials = creds , use_gax = False )
708+ client = self ._make_one (credentials = creds , _use_grpc = False )
709709 self .assertIsNone (client ._speech_api )
710710 self .assertIsInstance (client .speech_api , HTTPSpeechAPI )
711711 self .assertIsInstance (client .speech_api ._connection , Connection )
0 commit comments