From e7b8c19e2039bc9c95bf34038e9650a9f05a3315 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 27 Apr 2022 12:14:32 -0400 Subject: [PATCH] chore: use gapic-generator-python 0.65.2 (#330) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use gapic-generator-python 0.65.2 PiperOrigin-RevId: 444333013 Source-Link: https://github.com/googleapis/googleapis/commit/f91b6cf82e929280f6562f6110957c654bd9e2e6 Source-Link: https://github.com/googleapis/googleapis-gen/commit/16eb36095c294e712c74a1bf23550817b42174e5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTZlYjM2MDk1YzI5NGU3MTJjNzRhMWJmMjM1NTA4MTdiNDIxNzRlNSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../data_transfer_service/async_client.py | 90 ++++++------ .../test_data_transfer_service.py | 128 +++++++++--------- 2 files changed, 109 insertions(+), 109 deletions(-) diff --git a/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/async_client.py b/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/async_client.py index 705c02827766..29b53e20076f 100644 --- a/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/async_client.py +++ b/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/async_client.py @@ -237,9 +237,9 @@ async def get_data_source( from google.cloud import bigquery_datatransfer_v1 - def sample_get_data_source(): + async def sample_get_data_source(): # Create a client - client = bigquery_datatransfer_v1.DataTransferServiceClient() + client = bigquery_datatransfer_v1.DataTransferServiceAsyncClient() # Initialize request argument(s) request = bigquery_datatransfer_v1.GetDataSourceRequest( @@ -247,7 +247,7 @@ def sample_get_data_source(): ) # Make the request - response = client.get_data_source(request=request) + response = await client.get_data_source(request=request) # Handle the response print(response) @@ -345,9 +345,9 @@ async def list_data_sources( from google.cloud import bigquery_datatransfer_v1 - def sample_list_data_sources(): + async def sample_list_data_sources(): # Create a client - client = bigquery_datatransfer_v1.DataTransferServiceClient() + client = bigquery_datatransfer_v1.DataTransferServiceAsyncClient() # Initialize request argument(s) request = bigquery_datatransfer_v1.ListDataSourcesRequest( @@ -358,7 +358,7 @@ def sample_list_data_sources(): page_result = client.list_data_sources(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -466,9 +466,9 @@ async def create_transfer_config( from google.cloud import bigquery_datatransfer_v1 - def sample_create_transfer_config(): + async def sample_create_transfer_config(): # Create a client - client = bigquery_datatransfer_v1.DataTransferServiceClient() + client = bigquery_datatransfer_v1.DataTransferServiceAsyncClient() # Initialize request argument(s) transfer_config = bigquery_datatransfer_v1.TransferConfig() @@ -480,7 +480,7 @@ def sample_create_transfer_config(): ) # Make the request - response = client.create_transfer_config(request=request) + response = await client.create_transfer_config(request=request) # Handle the response print(response) @@ -592,9 +592,9 @@ async def update_transfer_config( from google.cloud import bigquery_datatransfer_v1 - def sample_update_transfer_config(): + async def sample_update_transfer_config(): # Create a client - client = bigquery_datatransfer_v1.DataTransferServiceClient() + client = bigquery_datatransfer_v1.DataTransferServiceAsyncClient() # Initialize request argument(s) transfer_config = bigquery_datatransfer_v1.TransferConfig() @@ -605,7 +605,7 @@ def sample_update_transfer_config(): ) # Make the request - response = client.update_transfer_config(request=request) + response = await client.update_transfer_config(request=request) # Handle the response print(response) @@ -710,9 +710,9 @@ async def delete_transfer_config( from google.cloud import bigquery_datatransfer_v1 - def sample_delete_transfer_config(): + async def sample_delete_transfer_config(): # Create a client - client = bigquery_datatransfer_v1.DataTransferServiceClient() + client = bigquery_datatransfer_v1.DataTransferServiceAsyncClient() # Initialize request argument(s) request = bigquery_datatransfer_v1.DeleteTransferConfigRequest( @@ -720,7 +720,7 @@ def sample_delete_transfer_config(): ) # Make the request - client.delete_transfer_config(request=request) + await client.delete_transfer_config(request=request) Args: request (Union[google.cloud.bigquery_datatransfer_v1.types.DeleteTransferConfigRequest, dict]): @@ -806,9 +806,9 @@ async def get_transfer_config( from google.cloud import bigquery_datatransfer_v1 - def sample_get_transfer_config(): + async def sample_get_transfer_config(): # Create a client - client = bigquery_datatransfer_v1.DataTransferServiceClient() + client = bigquery_datatransfer_v1.DataTransferServiceAsyncClient() # Initialize request argument(s) request = bigquery_datatransfer_v1.GetTransferConfigRequest( @@ -816,7 +816,7 @@ def sample_get_transfer_config(): ) # Make the request - response = client.get_transfer_config(request=request) + response = await client.get_transfer_config(request=request) # Handle the response print(response) @@ -920,9 +920,9 @@ async def list_transfer_configs( from google.cloud import bigquery_datatransfer_v1 - def sample_list_transfer_configs(): + async def sample_list_transfer_configs(): # Create a client - client = bigquery_datatransfer_v1.DataTransferServiceClient() + client = bigquery_datatransfer_v1.DataTransferServiceAsyncClient() # Initialize request argument(s) request = bigquery_datatransfer_v1.ListTransferConfigsRequest( @@ -933,7 +933,7 @@ def sample_list_transfer_configs(): page_result = client.list_transfer_configs(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -1045,9 +1045,9 @@ async def schedule_transfer_runs( from google.cloud import bigquery_datatransfer_v1 - def sample_schedule_transfer_runs(): + async def sample_schedule_transfer_runs(): # Create a client - client = bigquery_datatransfer_v1.DataTransferServiceClient() + client = bigquery_datatransfer_v1.DataTransferServiceAsyncClient() # Initialize request argument(s) request = bigquery_datatransfer_v1.ScheduleTransferRunsRequest( @@ -1055,7 +1055,7 @@ def sample_schedule_transfer_runs(): ) # Make the request - response = client.schedule_transfer_runs(request=request) + response = await client.schedule_transfer_runs(request=request) # Handle the response print(response) @@ -1166,16 +1166,16 @@ async def start_manual_transfer_runs( from google.cloud import bigquery_datatransfer_v1 - def sample_start_manual_transfer_runs(): + async def sample_start_manual_transfer_runs(): # Create a client - client = bigquery_datatransfer_v1.DataTransferServiceClient() + client = bigquery_datatransfer_v1.DataTransferServiceAsyncClient() # Initialize request argument(s) request = bigquery_datatransfer_v1.StartManualTransferRunsRequest( ) # Make the request - response = client.start_manual_transfer_runs(request=request) + response = await client.start_manual_transfer_runs(request=request) # Handle the response print(response) @@ -1240,9 +1240,9 @@ async def get_transfer_run( from google.cloud import bigquery_datatransfer_v1 - def sample_get_transfer_run(): + async def sample_get_transfer_run(): # Create a client - client = bigquery_datatransfer_v1.DataTransferServiceClient() + client = bigquery_datatransfer_v1.DataTransferServiceAsyncClient() # Initialize request argument(s) request = bigquery_datatransfer_v1.GetTransferRunRequest( @@ -1250,7 +1250,7 @@ def sample_get_transfer_run(): ) # Make the request - response = client.get_transfer_run(request=request) + response = await client.get_transfer_run(request=request) # Handle the response print(response) @@ -1346,9 +1346,9 @@ async def delete_transfer_run( from google.cloud import bigquery_datatransfer_v1 - def sample_delete_transfer_run(): + async def sample_delete_transfer_run(): # Create a client - client = bigquery_datatransfer_v1.DataTransferServiceClient() + client = bigquery_datatransfer_v1.DataTransferServiceAsyncClient() # Initialize request argument(s) request = bigquery_datatransfer_v1.DeleteTransferRunRequest( @@ -1356,7 +1356,7 @@ def sample_delete_transfer_run(): ) # Make the request - client.delete_transfer_run(request=request) + await client.delete_transfer_run(request=request) Args: request (Union[google.cloud.bigquery_datatransfer_v1.types.DeleteTransferRunRequest, dict]): @@ -1443,9 +1443,9 @@ async def list_transfer_runs( from google.cloud import bigquery_datatransfer_v1 - def sample_list_transfer_runs(): + async def sample_list_transfer_runs(): # Create a client - client = bigquery_datatransfer_v1.DataTransferServiceClient() + client = bigquery_datatransfer_v1.DataTransferServiceAsyncClient() # Initialize request argument(s) request = bigquery_datatransfer_v1.ListTransferRunsRequest( @@ -1456,7 +1456,7 @@ def sample_list_transfer_runs(): page_result = client.list_transfer_runs(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -1564,9 +1564,9 @@ async def list_transfer_logs( from google.cloud import bigquery_datatransfer_v1 - def sample_list_transfer_logs(): + async def sample_list_transfer_logs(): # Create a client - client = bigquery_datatransfer_v1.DataTransferServiceClient() + client = bigquery_datatransfer_v1.DataTransferServiceAsyncClient() # Initialize request argument(s) request = bigquery_datatransfer_v1.ListTransferLogsRequest( @@ -1577,7 +1577,7 @@ def sample_list_transfer_logs(): page_result = client.list_transfer_logs(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -1685,9 +1685,9 @@ async def check_valid_creds( from google.cloud import bigquery_datatransfer_v1 - def sample_check_valid_creds(): + async def sample_check_valid_creds(): # Create a client - client = bigquery_datatransfer_v1.DataTransferServiceClient() + client = bigquery_datatransfer_v1.DataTransferServiceAsyncClient() # Initialize request argument(s) request = bigquery_datatransfer_v1.CheckValidCredsRequest( @@ -1695,7 +1695,7 @@ def sample_check_valid_creds(): ) # Make the request - response = client.check_valid_creds(request=request) + response = await client.check_valid_creds(request=request) # Handle the response print(response) @@ -1804,16 +1804,16 @@ async def enroll_data_sources( from google.cloud import bigquery_datatransfer_v1 - def sample_enroll_data_sources(): + async def sample_enroll_data_sources(): # Create a client - client = bigquery_datatransfer_v1.DataTransferServiceClient() + client = bigquery_datatransfer_v1.DataTransferServiceAsyncClient() # Initialize request argument(s) request = bigquery_datatransfer_v1.EnrollDataSourcesRequest( ) # Make the request - client.enroll_data_sources(request=request) + await client.enroll_data_sources(request=request) Args: request (Union[google.cloud.bigquery_datatransfer_v1.types.EnrollDataSourcesRequest, dict]): diff --git a/packages/google-cloud-bigquery-datatransfer/tests/unit/gapic/bigquery_datatransfer_v1/test_data_transfer_service.py b/packages/google-cloud-bigquery-datatransfer/tests/unit/gapic/bigquery_datatransfer_v1/test_data_transfer_service.py index 1820ed43971b..008edb3429ba 100644 --- a/packages/google-cloud-bigquery-datatransfer/tests/unit/gapic/bigquery_datatransfer_v1/test_data_transfer_service.py +++ b/packages/google-cloud-bigquery-datatransfer/tests/unit/gapic/bigquery_datatransfer_v1/test_data_transfer_service.py @@ -841,7 +841,7 @@ def test_get_data_source_field_headers(): # a field header. Set these to a non-empty value. request = datatransfer.GetDataSourceRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_data_source), "__call__") as call: @@ -857,7 +857,7 @@ def test_get_data_source_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -871,7 +871,7 @@ async def test_get_data_source_field_headers_async(): # a field header. Set these to a non-empty value. request = datatransfer.GetDataSourceRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_data_source), "__call__") as call: @@ -889,7 +889,7 @@ async def test_get_data_source_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1079,7 +1079,7 @@ def test_list_data_sources_field_headers(): # a field header. Set these to a non-empty value. request = datatransfer.ListDataSourcesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1097,7 +1097,7 @@ def test_list_data_sources_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1111,7 +1111,7 @@ async def test_list_data_sources_field_headers_async(): # a field header. Set these to a non-empty value. request = datatransfer.ListDataSourcesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1131,7 +1131,7 @@ async def test_list_data_sources_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1268,7 +1268,7 @@ def test_list_data_sources_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, datatransfer.DataSource) for i in results) @@ -1559,7 +1559,7 @@ def test_create_transfer_config_field_headers(): # a field header. Set these to a non-empty value. request = datatransfer.CreateTransferConfigRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1577,7 +1577,7 @@ def test_create_transfer_config_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1591,7 +1591,7 @@ async def test_create_transfer_config_field_headers_async(): # a field header. Set these to a non-empty value. request = datatransfer.CreateTransferConfigRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1611,7 +1611,7 @@ async def test_create_transfer_config_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1853,7 +1853,7 @@ def test_update_transfer_config_field_headers(): # a field header. Set these to a non-empty value. request = datatransfer.UpdateTransferConfigRequest() - request.transfer_config.name = "transfer_config.name/value" + request.transfer_config.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1871,7 +1871,7 @@ def test_update_transfer_config_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "transfer_config.name=transfer_config.name/value", + "transfer_config.name=name_value", ) in kw["metadata"] @@ -1885,7 +1885,7 @@ async def test_update_transfer_config_field_headers_async(): # a field header. Set these to a non-empty value. request = datatransfer.UpdateTransferConfigRequest() - request.transfer_config.name = "transfer_config.name/value" + request.transfer_config.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1905,7 +1905,7 @@ async def test_update_transfer_config_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "transfer_config.name=transfer_config.name/value", + "transfer_config.name=name_value", ) in kw["metadata"] @@ -2102,7 +2102,7 @@ def test_delete_transfer_config_field_headers(): # a field header. Set these to a non-empty value. request = datatransfer.DeleteTransferConfigRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2120,7 +2120,7 @@ def test_delete_transfer_config_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2134,7 +2134,7 @@ async def test_delete_transfer_config_field_headers_async(): # a field header. Set these to a non-empty value. request = datatransfer.DeleteTransferConfigRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2152,7 +2152,7 @@ async def test_delete_transfer_config_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2381,7 +2381,7 @@ def test_get_transfer_config_field_headers(): # a field header. Set these to a non-empty value. request = datatransfer.GetTransferConfigRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2399,7 +2399,7 @@ def test_get_transfer_config_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2413,7 +2413,7 @@ async def test_get_transfer_config_field_headers_async(): # a field header. Set these to a non-empty value. request = datatransfer.GetTransferConfigRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2433,7 +2433,7 @@ async def test_get_transfer_config_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2628,7 +2628,7 @@ def test_list_transfer_configs_field_headers(): # a field header. Set these to a non-empty value. request = datatransfer.ListTransferConfigsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2646,7 +2646,7 @@ def test_list_transfer_configs_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2660,7 +2660,7 @@ async def test_list_transfer_configs_field_headers_async(): # a field header. Set these to a non-empty value. request = datatransfer.ListTransferConfigsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2680,7 +2680,7 @@ async def test_list_transfer_configs_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2817,7 +2817,7 @@ def test_list_transfer_configs_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, transfer.TransferConfig) for i in results) @@ -3065,7 +3065,7 @@ def test_schedule_transfer_runs_field_headers(): # a field header. Set these to a non-empty value. request = datatransfer.ScheduleTransferRunsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3083,7 +3083,7 @@ def test_schedule_transfer_runs_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3097,7 +3097,7 @@ async def test_schedule_transfer_runs_field_headers_async(): # a field header. Set these to a non-empty value. request = datatransfer.ScheduleTransferRunsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3117,7 +3117,7 @@ async def test_schedule_transfer_runs_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3326,7 +3326,7 @@ def test_start_manual_transfer_runs_field_headers(): # a field header. Set these to a non-empty value. request = datatransfer.StartManualTransferRunsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3344,7 +3344,7 @@ def test_start_manual_transfer_runs_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3358,7 +3358,7 @@ async def test_start_manual_transfer_runs_field_headers_async(): # a field header. Set these to a non-empty value. request = datatransfer.StartManualTransferRunsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3378,7 +3378,7 @@ async def test_start_manual_transfer_runs_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3501,7 +3501,7 @@ def test_get_transfer_run_field_headers(): # a field header. Set these to a non-empty value. request = datatransfer.GetTransferRunRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_transfer_run), "__call__") as call: @@ -3517,7 +3517,7 @@ def test_get_transfer_run_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3531,7 +3531,7 @@ async def test_get_transfer_run_field_headers_async(): # a field header. Set these to a non-empty value. request = datatransfer.GetTransferRunRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_transfer_run), "__call__") as call: @@ -3549,7 +3549,7 @@ async def test_get_transfer_run_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3731,7 +3731,7 @@ def test_delete_transfer_run_field_headers(): # a field header. Set these to a non-empty value. request = datatransfer.DeleteTransferRunRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3749,7 +3749,7 @@ def test_delete_transfer_run_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3763,7 +3763,7 @@ async def test_delete_transfer_run_field_headers_async(): # a field header. Set these to a non-empty value. request = datatransfer.DeleteTransferRunRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3781,7 +3781,7 @@ async def test_delete_transfer_run_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3973,7 +3973,7 @@ def test_list_transfer_runs_field_headers(): # a field header. Set these to a non-empty value. request = datatransfer.ListTransferRunsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3991,7 +3991,7 @@ def test_list_transfer_runs_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -4005,7 +4005,7 @@ async def test_list_transfer_runs_field_headers_async(): # a field header. Set these to a non-empty value. request = datatransfer.ListTransferRunsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4025,7 +4025,7 @@ async def test_list_transfer_runs_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -4162,7 +4162,7 @@ def test_list_transfer_runs_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, transfer.TransferRun) for i in results) @@ -4415,7 +4415,7 @@ def test_list_transfer_logs_field_headers(): # a field header. Set these to a non-empty value. request = datatransfer.ListTransferLogsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4433,7 +4433,7 @@ def test_list_transfer_logs_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -4447,7 +4447,7 @@ async def test_list_transfer_logs_field_headers_async(): # a field header. Set these to a non-empty value. request = datatransfer.ListTransferLogsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4467,7 +4467,7 @@ async def test_list_transfer_logs_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -4604,7 +4604,7 @@ def test_list_transfer_logs_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, transfer.TransferMessage) for i in results) @@ -4857,7 +4857,7 @@ def test_check_valid_creds_field_headers(): # a field header. Set these to a non-empty value. request = datatransfer.CheckValidCredsRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4875,7 +4875,7 @@ def test_check_valid_creds_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4889,7 +4889,7 @@ async def test_check_valid_creds_field_headers_async(): # a field header. Set these to a non-empty value. request = datatransfer.CheckValidCredsRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4909,7 +4909,7 @@ async def test_check_valid_creds_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -5095,7 +5095,7 @@ def test_enroll_data_sources_field_headers(): # a field header. Set these to a non-empty value. request = datatransfer.EnrollDataSourcesRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5113,7 +5113,7 @@ def test_enroll_data_sources_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -5127,7 +5127,7 @@ async def test_enroll_data_sources_field_headers_async(): # a field header. Set these to a non-empty value. request = datatransfer.EnrollDataSourcesRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5145,7 +5145,7 @@ async def test_enroll_data_sources_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"]