13
13
# limitations under the License.
14
14
15
15
import grpc
16
- from grpc . experimental import aio
16
+ from grpc import aio
17
17
import mock
18
18
import pytest
19
19
@@ -270,7 +270,7 @@ def test_wrap_errors_streaming(wrap_stream_errors):
270
270
autospec = True ,
271
271
return_value = (mock .sentinel .credentials , mock .sentinel .projet ),
272
272
)
273
- @mock .patch ("grpc.experimental. aio.secure_channel" )
273
+ @mock .patch ("grpc.aio.secure_channel" )
274
274
def test_create_channel_implicit (grpc_secure_channel , default , composite_creds_call ):
275
275
target = "example.com:443"
276
276
composite_creds = composite_creds_call .return_value
@@ -295,7 +295,7 @@ def test_create_channel_implicit(grpc_secure_channel, default, composite_creds_c
295
295
autospec = True ,
296
296
return_value = (mock .sentinel .credentials , mock .sentinel .projet ),
297
297
)
298
- @mock .patch ("grpc.experimental. aio.secure_channel" )
298
+ @mock .patch ("grpc.aio.secure_channel" )
299
299
def test_create_channel_implicit_with_default_host (
300
300
grpc_secure_channel , default , composite_creds_call , request , auth_metadata_plugin
301
301
):
@@ -319,7 +319,7 @@ def test_create_channel_implicit_with_default_host(
319
319
"google.auth.default" ,
320
320
return_value = (mock .sentinel .credentials , mock .sentinel .projet ),
321
321
)
322
- @mock .patch ("grpc.experimental. aio.secure_channel" )
322
+ @mock .patch ("grpc.aio.secure_channel" )
323
323
def test_create_channel_implicit_with_ssl_creds (
324
324
grpc_secure_channel , default , composite_creds_call
325
325
):
@@ -341,7 +341,7 @@ def test_create_channel_implicit_with_ssl_creds(
341
341
autospec = True ,
342
342
return_value = (mock .sentinel .credentials , mock .sentinel .projet ),
343
343
)
344
- @mock .patch ("grpc.experimental. aio.secure_channel" )
344
+ @mock .patch ("grpc.aio.secure_channel" )
345
345
def test_create_channel_implicit_with_scopes (
346
346
grpc_secure_channel , default , composite_creds_call
347
347
):
@@ -362,7 +362,7 @@ def test_create_channel_implicit_with_scopes(
362
362
autospec = True ,
363
363
return_value = (mock .sentinel .credentials , mock .sentinel .projet ),
364
364
)
365
- @mock .patch ("grpc.experimental. aio.secure_channel" )
365
+ @mock .patch ("grpc.aio.secure_channel" )
366
366
def test_create_channel_implicit_with_default_scopes (
367
367
grpc_secure_channel , default , composite_creds_call
368
368
):
@@ -394,7 +394,7 @@ def test_create_channel_explicit_with_duplicate_credentials():
394
394
395
395
@mock .patch ("grpc.composite_channel_credentials" )
396
396
@mock .patch ("google.auth.credentials.with_scopes_if_required" , autospec = True )
397
- @mock .patch ("grpc.experimental. aio.secure_channel" )
397
+ @mock .patch ("grpc.aio.secure_channel" )
398
398
def test_create_channel_explicit (grpc_secure_channel , auth_creds , composite_creds_call ):
399
399
target = "example.com:443"
400
400
composite_creds = composite_creds_call .return_value
@@ -411,7 +411,7 @@ def test_create_channel_explicit(grpc_secure_channel, auth_creds, composite_cred
411
411
412
412
413
413
@mock .patch ("grpc.composite_channel_credentials" )
414
- @mock .patch ("grpc.experimental. aio.secure_channel" )
414
+ @mock .patch ("grpc.aio.secure_channel" )
415
415
def test_create_channel_explicit_scoped (grpc_secure_channel , composite_creds_call ):
416
416
target = "example.com:443"
417
417
scopes = ["1" , "2" ]
@@ -430,7 +430,7 @@ def test_create_channel_explicit_scoped(grpc_secure_channel, composite_creds_cal
430
430
431
431
432
432
@mock .patch ("grpc.composite_channel_credentials" )
433
- @mock .patch ("grpc.experimental. aio.secure_channel" )
433
+ @mock .patch ("grpc.aio.secure_channel" )
434
434
def test_create_channel_explicit_default_scopes (
435
435
grpc_secure_channel , composite_creds_call
436
436
):
@@ -453,7 +453,7 @@ def test_create_channel_explicit_default_scopes(
453
453
454
454
455
455
@mock .patch ("grpc.composite_channel_credentials" )
456
- @mock .patch ("grpc.experimental. aio.secure_channel" )
456
+ @mock .patch ("grpc.aio.secure_channel" )
457
457
def test_create_channel_explicit_with_quota_project (
458
458
grpc_secure_channel , composite_creds_call
459
459
):
@@ -474,7 +474,7 @@ def test_create_channel_explicit_with_quota_project(
474
474
475
475
476
476
@mock .patch ("grpc.composite_channel_credentials" )
477
- @mock .patch ("grpc.experimental. aio.secure_channel" )
477
+ @mock .patch ("grpc.aio.secure_channel" )
478
478
@mock .patch (
479
479
"google.auth.load_credentials_from_file" ,
480
480
autospec = True ,
@@ -500,7 +500,7 @@ def test_create_channnel_with_credentials_file(
500
500
501
501
502
502
@mock .patch ("grpc.composite_channel_credentials" )
503
- @mock .patch ("grpc.experimental. aio.secure_channel" )
503
+ @mock .patch ("grpc.aio.secure_channel" )
504
504
@mock .patch (
505
505
"google.auth.load_credentials_from_file" ,
506
506
autospec = True ,
@@ -527,7 +527,7 @@ def test_create_channel_with_credentials_file_and_scopes(
527
527
528
528
529
529
@mock .patch ("grpc.composite_channel_credentials" )
530
- @mock .patch ("grpc.experimental. aio.secure_channel" )
530
+ @mock .patch ("grpc.aio.secure_channel" )
531
531
@mock .patch (
532
532
"google.auth.load_credentials_from_file" ,
533
533
autospec = True ,
@@ -556,7 +556,7 @@ def test_create_channel_with_credentials_file_and_default_scopes(
556
556
@pytest .mark .skipif (
557
557
grpc_helpers_async .HAS_GRPC_GCP , reason = "grpc_gcp module not available"
558
558
)
559
- @mock .patch ("grpc.experimental. aio.secure_channel" )
559
+ @mock .patch ("grpc.aio.secure_channel" )
560
560
def test_create_channel_without_grpc_gcp (grpc_secure_channel ):
561
561
target = "example.com:443"
562
562
scopes = ["test_scope" ]
0 commit comments