diff --git a/google/cloud/logging_v2/services/config_service_v2/async_client.py b/google/cloud/logging_v2/services/config_service_v2/async_client.py index 808766079..0a325ce86 100644 --- a/google/cloud/logging_v2/services/config_service_v2/async_client.py +++ b/google/cloud/logging_v2/services/config_service_v2/async_client.py @@ -235,9 +235,9 @@ async def list_buckets( from google.cloud import logging_v2 - def sample_list_buckets(): + async def sample_list_buckets(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.ListBucketsRequest( @@ -248,7 +248,7 @@ def sample_list_buckets(): page_result = client.list_buckets(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -351,9 +351,9 @@ async def get_bucket( from google.cloud import logging_v2 - def sample_get_bucket(): + async def sample_get_bucket(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.GetBucketRequest( @@ -361,7 +361,7 @@ def sample_get_bucket(): ) # Make the request - response = client.get_bucket(request=request) + response = await client.get_bucket(request=request) # Handle the response print(response) @@ -425,9 +425,9 @@ async def create_bucket( from google.cloud import logging_v2 - def sample_create_bucket(): + async def sample_create_bucket(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.CreateBucketRequest( @@ -436,7 +436,7 @@ def sample_create_bucket(): ) # Make the request - response = client.create_bucket(request=request) + response = await client.create_bucket(request=request) # Handle the response print(response) @@ -509,9 +509,9 @@ async def update_bucket( from google.cloud import logging_v2 - def sample_update_bucket(): + async def sample_update_bucket(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.UpdateBucketRequest( @@ -519,7 +519,7 @@ def sample_update_bucket(): ) # Make the request - response = client.update_bucket(request=request) + response = await client.update_bucket(request=request) # Handle the response print(response) @@ -586,9 +586,9 @@ async def delete_bucket( from google.cloud import logging_v2 - def sample_delete_bucket(): + async def sample_delete_bucket(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.DeleteBucketRequest( @@ -596,7 +596,7 @@ def sample_delete_bucket(): ) # Make the request - client.delete_bucket(request=request) + await client.delete_bucket(request=request) Args: request (Union[google.cloud.logging_v2.types.DeleteBucketRequest, dict]): @@ -648,9 +648,9 @@ async def undelete_bucket( from google.cloud import logging_v2 - def sample_undelete_bucket(): + async def sample_undelete_bucket(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.UndeleteBucketRequest( @@ -658,7 +658,7 @@ def sample_undelete_bucket(): ) # Make the request - client.undelete_bucket(request=request) + await client.undelete_bucket(request=request) Args: request (Union[google.cloud.logging_v2.types.UndeleteBucketRequest, dict]): @@ -709,9 +709,9 @@ async def list_views( from google.cloud import logging_v2 - def sample_list_views(): + async def sample_list_views(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.ListViewsRequest( @@ -722,7 +722,7 @@ def sample_list_views(): page_result = client.list_views(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -817,9 +817,9 @@ async def get_view( from google.cloud import logging_v2 - def sample_get_view(): + async def sample_get_view(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.GetViewRequest( @@ -827,7 +827,7 @@ def sample_get_view(): ) # Make the request - response = client.get_view(request=request) + response = await client.get_view(request=request) # Handle the response print(response) @@ -890,9 +890,9 @@ async def create_view( from google.cloud import logging_v2 - def sample_create_view(): + async def sample_create_view(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.CreateViewRequest( @@ -901,7 +901,7 @@ def sample_create_view(): ) # Make the request - response = client.create_view(request=request) + response = await client.create_view(request=request) # Handle the response print(response) @@ -967,9 +967,9 @@ async def update_view( from google.cloud import logging_v2 - def sample_update_view(): + async def sample_update_view(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.UpdateViewRequest( @@ -977,7 +977,7 @@ def sample_update_view(): ) # Make the request - response = client.update_view(request=request) + response = await client.update_view(request=request) # Handle the response print(response) @@ -1042,9 +1042,9 @@ async def delete_view( from google.cloud import logging_v2 - def sample_delete_view(): + async def sample_delete_view(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.DeleteViewRequest( @@ -1052,7 +1052,7 @@ def sample_delete_view(): ) # Make the request - client.delete_view(request=request) + await client.delete_view(request=request) Args: request (Union[google.cloud.logging_v2.types.DeleteViewRequest, dict]): @@ -1103,9 +1103,9 @@ async def list_sinks( from google.cloud import logging_v2 - def sample_list_sinks(): + async def sample_list_sinks(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.ListSinksRequest( @@ -1116,7 +1116,7 @@ def sample_list_sinks(): page_result = client.list_sinks(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -1227,9 +1227,9 @@ async def get_sink( from google.cloud import logging_v2 - def sample_get_sink(): + async def sample_get_sink(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.GetSinkRequest( @@ -1237,7 +1237,7 @@ def sample_get_sink(): ) # Make the request - response = client.get_sink(request=request) + response = await client.get_sink(request=request) # Handle the response print(response) @@ -1356,9 +1356,9 @@ async def create_sink( from google.cloud import logging_v2 - def sample_create_sink(): + async def sample_create_sink(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) sink = logging_v2.LogSink() @@ -1371,7 +1371,7 @@ def sample_create_sink(): ) # Make the request - response = client.create_sink(request=request) + response = await client.create_sink(request=request) # Handle the response print(response) @@ -1488,9 +1488,9 @@ async def update_sink( from google.cloud import logging_v2 - def sample_update_sink(): + async def sample_update_sink(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) sink = logging_v2.LogSink() @@ -1503,7 +1503,7 @@ def sample_update_sink(): ) # Make the request - response = client.update_sink(request=request) + response = await client.update_sink(request=request) # Handle the response print(response) @@ -1652,9 +1652,9 @@ async def delete_sink( from google.cloud import logging_v2 - def sample_delete_sink(): + async def sample_delete_sink(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.DeleteSinkRequest( @@ -1662,7 +1662,7 @@ def sample_delete_sink(): ) # Make the request - client.delete_sink(request=request) + await client.delete_sink(request=request) Args: request (Union[google.cloud.logging_v2.types.DeleteSinkRequest, dict]): @@ -1759,9 +1759,9 @@ async def list_exclusions( from google.cloud import logging_v2 - def sample_list_exclusions(): + async def sample_list_exclusions(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.ListExclusionsRequest( @@ -1772,7 +1772,7 @@ def sample_list_exclusions(): page_result = client.list_exclusions(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -1883,9 +1883,9 @@ async def get_exclusion( from google.cloud import logging_v2 - def sample_get_exclusion(): + async def sample_get_exclusion(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.GetExclusionRequest( @@ -1893,7 +1893,7 @@ def sample_get_exclusion(): ) # Make the request - response = client.get_exclusion(request=request) + response = await client.get_exclusion(request=request) # Handle the response print(response) @@ -2006,9 +2006,9 @@ async def create_exclusion( from google.cloud import logging_v2 - def sample_create_exclusion(): + async def sample_create_exclusion(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) exclusion = logging_v2.LogExclusion() @@ -2021,7 +2021,7 @@ def sample_create_exclusion(): ) # Make the request - response = client.create_exclusion(request=request) + response = await client.create_exclusion(request=request) # Handle the response print(response) @@ -2135,9 +2135,9 @@ async def update_exclusion( from google.cloud import logging_v2 - def sample_update_exclusion(): + async def sample_update_exclusion(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) exclusion = logging_v2.LogExclusion() @@ -2150,7 +2150,7 @@ def sample_update_exclusion(): ) # Make the request - response = client.update_exclusion(request=request) + response = await client.update_exclusion(request=request) # Handle the response print(response) @@ -2275,9 +2275,9 @@ async def delete_exclusion( from google.cloud import logging_v2 - def sample_delete_exclusion(): + async def sample_delete_exclusion(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.DeleteExclusionRequest( @@ -2285,7 +2285,7 @@ def sample_delete_exclusion(): ) # Make the request - client.delete_exclusion(request=request) + await client.delete_exclusion(request=request) Args: request (Union[google.cloud.logging_v2.types.DeleteExclusionRequest, dict]): @@ -2387,9 +2387,9 @@ async def get_cmek_settings( from google.cloud import logging_v2 - def sample_get_cmek_settings(): + async def sample_get_cmek_settings(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.GetCmekSettingsRequest( @@ -2397,7 +2397,7 @@ def sample_get_cmek_settings(): ) # Make the request - response = client.get_cmek_settings(request=request) + response = await client.get_cmek_settings(request=request) # Handle the response print(response) @@ -2487,9 +2487,9 @@ async def update_cmek_settings( from google.cloud import logging_v2 - def sample_update_cmek_settings(): + async def sample_update_cmek_settings(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.UpdateCmekSettingsRequest( @@ -2497,7 +2497,7 @@ def sample_update_cmek_settings(): ) # Make the request - response = client.update_cmek_settings(request=request) + response = await client.update_cmek_settings(request=request) # Handle the response print(response) @@ -2584,9 +2584,9 @@ async def get_settings( from google.cloud import logging_v2 - def sample_get_settings(): + async def sample_get_settings(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.GetSettingsRequest( @@ -2594,7 +2594,7 @@ def sample_get_settings(): ) # Make the request - response = client.get_settings(request=request) + response = await client.get_settings(request=request) # Handle the response print(response) @@ -2718,9 +2718,9 @@ async def update_settings( from google.cloud import logging_v2 - def sample_update_settings(): + async def sample_update_settings(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.UpdateSettingsRequest( @@ -2728,7 +2728,7 @@ def sample_update_settings(): ) # Make the request - response = client.update_settings(request=request) + response = await client.update_settings(request=request) # Handle the response print(response) @@ -2836,9 +2836,9 @@ async def copy_log_entries( from google.cloud import logging_v2 - def sample_copy_log_entries(): + async def sample_copy_log_entries(): # Create a client - client = logging_v2.ConfigServiceV2Client() + client = logging_v2.ConfigServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.CopyLogEntriesRequest( @@ -2851,7 +2851,7 @@ def sample_copy_log_entries(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) diff --git a/google/cloud/logging_v2/services/logging_service_v2/async_client.py b/google/cloud/logging_v2/services/logging_service_v2/async_client.py index ec78309a6..32a1d1808 100644 --- a/google/cloud/logging_v2/services/logging_service_v2/async_client.py +++ b/google/cloud/logging_v2/services/logging_service_v2/async_client.py @@ -234,9 +234,9 @@ async def delete_log( from google.cloud import logging_v2 - def sample_delete_log(): + async def sample_delete_log(): # Create a client - client = logging_v2.LoggingServiceV2Client() + client = logging_v2.LoggingServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.DeleteLogRequest( @@ -244,7 +244,7 @@ def sample_delete_log(): ) # Make the request - client.delete_log(request=request) + await client.delete_log(request=request) Args: request (Union[google.cloud.logging_v2.types.DeleteLogRequest, dict]): @@ -347,9 +347,9 @@ async def write_log_entries( from google.cloud import logging_v2 - def sample_write_log_entries(): + async def sample_write_log_entries(): # Create a client - client = logging_v2.LoggingServiceV2Client() + client = logging_v2.LoggingServiceV2AsyncClient() # Initialize request argument(s) entries = logging_v2.LogEntry() @@ -360,7 +360,7 @@ def sample_write_log_entries(): ) # Make the request - response = client.write_log_entries(request=request) + response = await client.write_log_entries(request=request) # Handle the response print(response) @@ -538,9 +538,9 @@ async def list_log_entries( from google.cloud import logging_v2 - def sample_list_log_entries(): + async def sample_list_log_entries(): # Create a client - client = logging_v2.LoggingServiceV2Client() + client = logging_v2.LoggingServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.ListLogEntriesRequest( @@ -551,7 +551,7 @@ def sample_list_log_entries(): page_result = client.list_log_entries(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -695,9 +695,9 @@ async def list_monitored_resource_descriptors( from google.cloud import logging_v2 - def sample_list_monitored_resource_descriptors(): + async def sample_list_monitored_resource_descriptors(): # Create a client - client = logging_v2.LoggingServiceV2Client() + client = logging_v2.LoggingServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.ListMonitoredResourceDescriptorsRequest( @@ -707,7 +707,7 @@ def sample_list_monitored_resource_descriptors(): page_result = client.list_monitored_resource_descriptors(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -788,9 +788,9 @@ async def list_logs( from google.cloud import logging_v2 - def sample_list_logs(): + async def sample_list_logs(): # Create a client - client = logging_v2.LoggingServiceV2Client() + client = logging_v2.LoggingServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.ListLogsRequest( @@ -801,7 +801,7 @@ def sample_list_logs(): page_result = client.list_logs(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -910,9 +910,9 @@ def tail_log_entries( from google.cloud import logging_v2 - def sample_tail_log_entries(): + async def sample_tail_log_entries(): # Create a client - client = logging_v2.LoggingServiceV2Client() + client = logging_v2.LoggingServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.TailLogEntriesRequest( @@ -930,10 +930,10 @@ def request_generator(): yield request # Make the request - stream = client.tail_log_entries(requests=request_generator()) + stream = await client.tail_log_entries(requests=request_generator()) # Handle the response - for response in stream: + async for response in stream: print(response) Args: diff --git a/google/cloud/logging_v2/services/metrics_service_v2/async_client.py b/google/cloud/logging_v2/services/metrics_service_v2/async_client.py index e9b59bf30..816b70695 100644 --- a/google/cloud/logging_v2/services/metrics_service_v2/async_client.py +++ b/google/cloud/logging_v2/services/metrics_service_v2/async_client.py @@ -220,9 +220,9 @@ async def list_log_metrics( from google.cloud import logging_v2 - def sample_list_log_metrics(): + async def sample_list_log_metrics(): # Create a client - client = logging_v2.MetricsServiceV2Client() + client = logging_v2.MetricsServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.ListLogMetricsRequest( @@ -233,7 +233,7 @@ def sample_list_log_metrics(): page_result = client.list_log_metrics(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -341,9 +341,9 @@ async def get_log_metric( from google.cloud import logging_v2 - def sample_get_log_metric(): + async def sample_get_log_metric(): # Create a client - client = logging_v2.MetricsServiceV2Client() + client = logging_v2.MetricsServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.GetLogMetricRequest( @@ -351,7 +351,7 @@ def sample_get_log_metric(): ) # Make the request - response = client.get_log_metric(request=request) + response = await client.get_log_metric(request=request) # Handle the response print(response) @@ -461,9 +461,9 @@ async def create_log_metric( from google.cloud import logging_v2 - def sample_create_log_metric(): + async def sample_create_log_metric(): # Create a client - client = logging_v2.MetricsServiceV2Client() + client = logging_v2.MetricsServiceV2AsyncClient() # Initialize request argument(s) metric = logging_v2.LogMetric() @@ -476,7 +476,7 @@ def sample_create_log_metric(): ) # Make the request - response = client.create_log_metric(request=request) + response = await client.create_log_metric(request=request) # Handle the response print(response) @@ -586,9 +586,9 @@ async def update_log_metric( from google.cloud import logging_v2 - def sample_update_log_metric(): + async def sample_update_log_metric(): # Create a client - client = logging_v2.MetricsServiceV2Client() + client = logging_v2.MetricsServiceV2AsyncClient() # Initialize request argument(s) metric = logging_v2.LogMetric() @@ -601,7 +601,7 @@ def sample_update_log_metric(): ) # Make the request - response = client.update_log_metric(request=request) + response = await client.update_log_metric(request=request) # Handle the response print(response) @@ -722,9 +722,9 @@ async def delete_log_metric( from google.cloud import logging_v2 - def sample_delete_log_metric(): + async def sample_delete_log_metric(): # Create a client - client = logging_v2.MetricsServiceV2Client() + client = logging_v2.MetricsServiceV2AsyncClient() # Initialize request argument(s) request = logging_v2.DeleteLogMetricRequest( @@ -732,7 +732,7 @@ def sample_delete_log_metric(): ) # Make the request - client.delete_log_metric(request=request) + await client.delete_log_metric(request=request) Args: request (Union[google.cloud.logging_v2.types.DeleteLogMetricRequest, dict]): diff --git a/tests/unit/gapic/logging_v2/test_config_service_v2.py b/tests/unit/gapic/logging_v2/test_config_service_v2.py index 18982084f..caa7bd689 100644 --- a/tests/unit/gapic/logging_v2/test_config_service_v2.py +++ b/tests/unit/gapic/logging_v2/test_config_service_v2.py @@ -771,7 +771,7 @@ def test_list_buckets_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.ListBucketsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_buckets), "__call__") as call: @@ -787,7 +787,7 @@ def test_list_buckets_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -801,7 +801,7 @@ async def test_list_buckets_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.ListBucketsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_buckets), "__call__") as call: @@ -819,7 +819,7 @@ async def test_list_buckets_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -950,7 +950,7 @@ def test_list_buckets_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, logging_config.LogBucket) for i in results) @@ -1211,7 +1211,7 @@ def test_get_bucket_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.GetBucketRequest() - 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_bucket), "__call__") as call: @@ -1227,7 +1227,7 @@ def test_get_bucket_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1241,7 +1241,7 @@ async def test_get_bucket_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.GetBucketRequest() - 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_bucket), "__call__") as call: @@ -1259,7 +1259,7 @@ async def test_get_bucket_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1381,7 +1381,7 @@ def test_create_bucket_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.CreateBucketRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_bucket), "__call__") as call: @@ -1397,7 +1397,7 @@ def test_create_bucket_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1411,7 +1411,7 @@ async def test_create_bucket_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.CreateBucketRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_bucket), "__call__") as call: @@ -1429,7 +1429,7 @@ async def test_create_bucket_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1551,7 +1551,7 @@ def test_update_bucket_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.UpdateBucketRequest() - 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.update_bucket), "__call__") as call: @@ -1567,7 +1567,7 @@ def test_update_bucket_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1581,7 +1581,7 @@ async def test_update_bucket_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.UpdateBucketRequest() - 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.update_bucket), "__call__") as call: @@ -1599,7 +1599,7 @@ async def test_update_bucket_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1693,7 +1693,7 @@ def test_delete_bucket_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.DeleteBucketRequest() - 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.delete_bucket), "__call__") as call: @@ -1709,7 +1709,7 @@ def test_delete_bucket_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1723,7 +1723,7 @@ async def test_delete_bucket_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.DeleteBucketRequest() - 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.delete_bucket), "__call__") as call: @@ -1739,7 +1739,7 @@ async def test_delete_bucket_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1833,7 +1833,7 @@ def test_undelete_bucket_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.UndeleteBucketRequest() - 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.undelete_bucket), "__call__") as call: @@ -1849,7 +1849,7 @@ def test_undelete_bucket_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1863,7 +1863,7 @@ async def test_undelete_bucket_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.UndeleteBucketRequest() - 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.undelete_bucket), "__call__") as call: @@ -1879,7 +1879,7 @@ async def test_undelete_bucket_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1981,7 +1981,7 @@ def test_list_views_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.ListViewsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_views), "__call__") as call: @@ -1997,7 +1997,7 @@ def test_list_views_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2011,7 +2011,7 @@ async def test_list_views_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.ListViewsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_views), "__call__") as call: @@ -2029,7 +2029,7 @@ async def test_list_views_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2160,7 +2160,7 @@ def test_list_views_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, logging_config.LogView) for i in results) @@ -2409,7 +2409,7 @@ def test_get_view_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.GetViewRequest() - 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_view), "__call__") as call: @@ -2425,7 +2425,7 @@ def test_get_view_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2439,7 +2439,7 @@ async def test_get_view_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.GetViewRequest() - 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_view), "__call__") as call: @@ -2457,7 +2457,7 @@ async def test_get_view_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2567,7 +2567,7 @@ def test_create_view_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.CreateViewRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_view), "__call__") as call: @@ -2583,7 +2583,7 @@ def test_create_view_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2597,7 +2597,7 @@ async def test_create_view_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.CreateViewRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_view), "__call__") as call: @@ -2615,7 +2615,7 @@ async def test_create_view_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2725,7 +2725,7 @@ def test_update_view_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.UpdateViewRequest() - 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.update_view), "__call__") as call: @@ -2741,7 +2741,7 @@ def test_update_view_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2755,7 +2755,7 @@ async def test_update_view_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.UpdateViewRequest() - 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.update_view), "__call__") as call: @@ -2773,7 +2773,7 @@ async def test_update_view_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2867,7 +2867,7 @@ def test_delete_view_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.DeleteViewRequest() - 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.delete_view), "__call__") as call: @@ -2883,7 +2883,7 @@ def test_delete_view_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2897,7 +2897,7 @@ async def test_delete_view_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.DeleteViewRequest() - 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.delete_view), "__call__") as call: @@ -2913,7 +2913,7 @@ async def test_delete_view_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3015,7 +3015,7 @@ def test_list_sinks_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.ListSinksRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_sinks), "__call__") as call: @@ -3031,7 +3031,7 @@ def test_list_sinks_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3045,7 +3045,7 @@ async def test_list_sinks_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.ListSinksRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_sinks), "__call__") as call: @@ -3063,7 +3063,7 @@ async def test_list_sinks_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3194,7 +3194,7 @@ def test_list_sinks_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, logging_config.LogSink) for i in results) @@ -3466,7 +3466,7 @@ def test_get_sink_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.GetSinkRequest() - request.sink_name = "sink_name/value" + request.sink_name = "sink_name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_sink), "__call__") as call: @@ -3482,7 +3482,7 @@ def test_get_sink_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "sink_name=sink_name/value", + "sink_name=sink_name_value", ) in kw["metadata"] @@ -3496,7 +3496,7 @@ async def test_get_sink_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.GetSinkRequest() - request.sink_name = "sink_name/value" + request.sink_name = "sink_name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_sink), "__call__") as call: @@ -3514,7 +3514,7 @@ async def test_get_sink_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "sink_name=sink_name/value", + "sink_name=sink_name_value", ) in kw["metadata"] @@ -3729,7 +3729,7 @@ def test_create_sink_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.CreateSinkRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_sink), "__call__") as call: @@ -3745,7 +3745,7 @@ def test_create_sink_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3759,7 +3759,7 @@ async def test_create_sink_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.CreateSinkRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_sink), "__call__") as call: @@ -3777,7 +3777,7 @@ async def test_create_sink_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -4002,7 +4002,7 @@ def test_update_sink_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.UpdateSinkRequest() - request.sink_name = "sink_name/value" + request.sink_name = "sink_name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_sink), "__call__") as call: @@ -4018,7 +4018,7 @@ def test_update_sink_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "sink_name=sink_name/value", + "sink_name=sink_name_value", ) in kw["metadata"] @@ -4032,7 +4032,7 @@ async def test_update_sink_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.UpdateSinkRequest() - request.sink_name = "sink_name/value" + request.sink_name = "sink_name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_sink), "__call__") as call: @@ -4050,7 +4050,7 @@ async def test_update_sink_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "sink_name=sink_name/value", + "sink_name=sink_name_value", ) in kw["metadata"] @@ -4246,7 +4246,7 @@ def test_delete_sink_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.DeleteSinkRequest() - request.sink_name = "sink_name/value" + request.sink_name = "sink_name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_sink), "__call__") as call: @@ -4262,7 +4262,7 @@ def test_delete_sink_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "sink_name=sink_name/value", + "sink_name=sink_name_value", ) in kw["metadata"] @@ -4276,7 +4276,7 @@ async def test_delete_sink_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.DeleteSinkRequest() - request.sink_name = "sink_name/value" + request.sink_name = "sink_name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_sink), "__call__") as call: @@ -4292,7 +4292,7 @@ async def test_delete_sink_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "sink_name=sink_name/value", + "sink_name=sink_name_value", ) in kw["metadata"] @@ -4474,7 +4474,7 @@ def test_list_exclusions_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.ListExclusionsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_exclusions), "__call__") as call: @@ -4490,7 +4490,7 @@ def test_list_exclusions_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -4504,7 +4504,7 @@ async def test_list_exclusions_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.ListExclusionsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_exclusions), "__call__") as call: @@ -4522,7 +4522,7 @@ async def test_list_exclusions_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -4653,7 +4653,7 @@ def test_list_exclusions_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, logging_config.LogExclusion) for i in results) @@ -4906,7 +4906,7 @@ def test_get_exclusion_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.GetExclusionRequest() - 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_exclusion), "__call__") as call: @@ -4922,7 +4922,7 @@ def test_get_exclusion_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4936,7 +4936,7 @@ async def test_get_exclusion_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.GetExclusionRequest() - 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_exclusion), "__call__") as call: @@ -4954,7 +4954,7 @@ async def test_get_exclusion_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -5150,7 +5150,7 @@ def test_create_exclusion_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.CreateExclusionRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_exclusion), "__call__") as call: @@ -5166,7 +5166,7 @@ def test_create_exclusion_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -5180,7 +5180,7 @@ async def test_create_exclusion_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.CreateExclusionRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_exclusion), "__call__") as call: @@ -5198,7 +5198,7 @@ async def test_create_exclusion_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -5404,7 +5404,7 @@ def test_update_exclusion_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.UpdateExclusionRequest() - 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.update_exclusion), "__call__") as call: @@ -5420,7 +5420,7 @@ def test_update_exclusion_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -5434,7 +5434,7 @@ async def test_update_exclusion_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.UpdateExclusionRequest() - 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.update_exclusion), "__call__") as call: @@ -5452,7 +5452,7 @@ async def test_update_exclusion_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -5648,7 +5648,7 @@ def test_delete_exclusion_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.DeleteExclusionRequest() - 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.delete_exclusion), "__call__") as call: @@ -5664,7 +5664,7 @@ def test_delete_exclusion_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -5678,7 +5678,7 @@ async def test_delete_exclusion_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.DeleteExclusionRequest() - 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.delete_exclusion), "__call__") as call: @@ -5694,7 +5694,7 @@ async def test_delete_exclusion_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -5890,7 +5890,7 @@ def test_get_cmek_settings_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.GetCmekSettingsRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5908,7 +5908,7 @@ def test_get_cmek_settings_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -5922,7 +5922,7 @@ async def test_get_cmek_settings_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.GetCmekSettingsRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5942,7 +5942,7 @@ async def test_get_cmek_settings_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -6059,7 +6059,7 @@ def test_update_cmek_settings_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.UpdateCmekSettingsRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6077,7 +6077,7 @@ def test_update_cmek_settings_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -6091,7 +6091,7 @@ async def test_update_cmek_settings_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.UpdateCmekSettingsRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6111,7 +6111,7 @@ async def test_update_cmek_settings_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -6229,7 +6229,7 @@ def test_get_settings_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.GetSettingsRequest() - 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_settings), "__call__") as call: @@ -6245,7 +6245,7 @@ def test_get_settings_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -6259,7 +6259,7 @@ async def test_get_settings_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.GetSettingsRequest() - 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_settings), "__call__") as call: @@ -6277,7 +6277,7 @@ async def test_get_settings_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -6477,7 +6477,7 @@ def test_update_settings_field_headers(): # a field header. Set these to a non-empty value. request = logging_config.UpdateSettingsRequest() - 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.update_settings), "__call__") as call: @@ -6493,7 +6493,7 @@ def test_update_settings_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -6507,7 +6507,7 @@ async def test_update_settings_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_config.UpdateSettingsRequest() - 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.update_settings), "__call__") as call: @@ -6525,7 +6525,7 @@ async def test_update_settings_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/tests/unit/gapic/logging_v2/test_logging_service_v2.py b/tests/unit/gapic/logging_v2/test_logging_service_v2.py index 1f74ac5b2..e7cbfcd8a 100644 --- a/tests/unit/gapic/logging_v2/test_logging_service_v2.py +++ b/tests/unit/gapic/logging_v2/test_logging_service_v2.py @@ -766,7 +766,7 @@ def test_delete_log_field_headers(): # a field header. Set these to a non-empty value. request = logging.DeleteLogRequest() - request.log_name = "log_name/value" + request.log_name = "log_name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_log), "__call__") as call: @@ -782,7 +782,7 @@ def test_delete_log_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "log_name=log_name/value", + "log_name=log_name_value", ) in kw["metadata"] @@ -796,7 +796,7 @@ async def test_delete_log_field_headers_async(): # a field header. Set these to a non-empty value. request = logging.DeleteLogRequest() - request.log_name = "log_name/value" + request.log_name = "log_name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_log), "__call__") as call: @@ -812,7 +812,7 @@ async def test_delete_log_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "log_name=log_name/value", + "log_name=log_name_value", ) in kw["metadata"] @@ -1334,7 +1334,7 @@ def test_list_log_entries_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, log_entry.LogEntry) for i in results) @@ -1617,7 +1617,7 @@ def test_list_monitored_resource_descriptors_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, monitored_resource_pb2.MonitoredResourceDescriptor) @@ -1874,7 +1874,7 @@ def test_list_logs_field_headers(): # a field header. Set these to a non-empty value. request = logging.ListLogsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_logs), "__call__") as call: @@ -1890,7 +1890,7 @@ def test_list_logs_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1904,7 +1904,7 @@ async def test_list_logs_field_headers_async(): # a field header. Set these to a non-empty value. request = logging.ListLogsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_logs), "__call__") as call: @@ -1922,7 +1922,7 @@ async def test_list_logs_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2053,7 +2053,7 @@ def test_list_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, str) for i in results) diff --git a/tests/unit/gapic/logging_v2/test_metrics_service_v2.py b/tests/unit/gapic/logging_v2/test_metrics_service_v2.py index 53ced9ce4..456d43946 100644 --- a/tests/unit/gapic/logging_v2/test_metrics_service_v2.py +++ b/tests/unit/gapic/logging_v2/test_metrics_service_v2.py @@ -772,7 +772,7 @@ def test_list_log_metrics_field_headers(): # a field header. Set these to a non-empty value. request = logging_metrics.ListLogMetricsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_log_metrics), "__call__") as call: @@ -788,7 +788,7 @@ def test_list_log_metrics_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -802,7 +802,7 @@ async def test_list_log_metrics_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_metrics.ListLogMetricsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_log_metrics), "__call__") as call: @@ -820,7 +820,7 @@ async def test_list_log_metrics_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -951,7 +951,7 @@ def test_list_log_metrics_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, logging_metrics.LogMetric) for i in results) @@ -1212,7 +1212,7 @@ def test_get_log_metric_field_headers(): # a field header. Set these to a non-empty value. request = logging_metrics.GetLogMetricRequest() - request.metric_name = "metric_name/value" + request.metric_name = "metric_name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_log_metric), "__call__") as call: @@ -1228,7 +1228,7 @@ def test_get_log_metric_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "metric_name=metric_name/value", + "metric_name=metric_name_value", ) in kw["metadata"] @@ -1242,7 +1242,7 @@ async def test_get_log_metric_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_metrics.GetLogMetricRequest() - request.metric_name = "metric_name/value" + request.metric_name = "metric_name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_log_metric), "__call__") as call: @@ -1260,7 +1260,7 @@ async def test_get_log_metric_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "metric_name=metric_name/value", + "metric_name=metric_name_value", ) in kw["metadata"] @@ -1470,7 +1470,7 @@ def test_create_log_metric_field_headers(): # a field header. Set these to a non-empty value. request = logging_metrics.CreateLogMetricRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1488,7 +1488,7 @@ def test_create_log_metric_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1502,7 +1502,7 @@ async def test_create_log_metric_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_metrics.CreateLogMetricRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1522,7 +1522,7 @@ async def test_create_log_metric_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1746,7 +1746,7 @@ def test_update_log_metric_field_headers(): # a field header. Set these to a non-empty value. request = logging_metrics.UpdateLogMetricRequest() - request.metric_name = "metric_name/value" + request.metric_name = "metric_name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1764,7 +1764,7 @@ def test_update_log_metric_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "metric_name=metric_name/value", + "metric_name=metric_name_value", ) in kw["metadata"] @@ -1778,7 +1778,7 @@ async def test_update_log_metric_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_metrics.UpdateLogMetricRequest() - request.metric_name = "metric_name/value" + request.metric_name = "metric_name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1798,7 +1798,7 @@ async def test_update_log_metric_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "metric_name=metric_name/value", + "metric_name=metric_name_value", ) in kw["metadata"] @@ -1994,7 +1994,7 @@ def test_delete_log_metric_field_headers(): # a field header. Set these to a non-empty value. request = logging_metrics.DeleteLogMetricRequest() - request.metric_name = "metric_name/value" + request.metric_name = "metric_name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2012,7 +2012,7 @@ def test_delete_log_metric_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "metric_name=metric_name/value", + "metric_name=metric_name_value", ) in kw["metadata"] @@ -2026,7 +2026,7 @@ async def test_delete_log_metric_field_headers_async(): # a field header. Set these to a non-empty value. request = logging_metrics.DeleteLogMetricRequest() - request.metric_name = "metric_name/value" + request.metric_name = "metric_name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2044,7 +2044,7 @@ async def test_delete_log_metric_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "metric_name=metric_name/value", + "metric_name=metric_name_value", ) in kw["metadata"]