From 1a1dc8562ba9531589c9225bb2620c0f01bbb177 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 11:15:12 -0400 Subject: [PATCH] chore: use gapic-generator-python 0.65.2 (#30) 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 --- .../livestream_service/async_client.py | 96 ++++++------- .../live_stream_v1/test_livestream_service.py | 134 +++++++++--------- 2 files changed, 115 insertions(+), 115 deletions(-) diff --git a/packages/google-cloud-video-live-stream/google/cloud/video/live_stream_v1/services/livestream_service/async_client.py b/packages/google-cloud-video-live-stream/google/cloud/video/live_stream_v1/services/livestream_service/async_client.py index f0eb231e7be6..72e1310ed05c 100644 --- a/packages/google-cloud-video-live-stream/google/cloud/video/live_stream_v1/services/livestream_service/async_client.py +++ b/packages/google-cloud-video-live-stream/google/cloud/video/live_stream_v1/services/livestream_service/async_client.py @@ -238,9 +238,9 @@ async def create_channel( from google.cloud.video import live_stream_v1 - def sample_create_channel(): + async def sample_create_channel(): # Create a client - client = live_stream_v1.LivestreamServiceClient() + client = live_stream_v1.LivestreamServiceAsyncClient() # Initialize request argument(s) request = live_stream_v1.CreateChannelRequest( @@ -253,7 +253,7 @@ def sample_create_channel(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -372,9 +372,9 @@ async def list_channels( from google.cloud.video import live_stream_v1 - def sample_list_channels(): + async def sample_list_channels(): # Create a client - client = live_stream_v1.LivestreamServiceClient() + client = live_stream_v1.LivestreamServiceAsyncClient() # Initialize request argument(s) request = live_stream_v1.ListChannelsRequest( @@ -385,7 +385,7 @@ def sample_list_channels(): page_result = client.list_channels(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -489,9 +489,9 @@ async def get_channel( from google.cloud.video import live_stream_v1 - def sample_get_channel(): + async def sample_get_channel(): # Create a client - client = live_stream_v1.LivestreamServiceClient() + client = live_stream_v1.LivestreamServiceAsyncClient() # Initialize request argument(s) request = live_stream_v1.GetChannelRequest( @@ -499,7 +499,7 @@ def sample_get_channel(): ) # Make the request - response = client.get_channel(request=request) + response = await client.get_channel(request=request) # Handle the response print(response) @@ -600,9 +600,9 @@ async def delete_channel( from google.cloud.video import live_stream_v1 - def sample_delete_channel(): + async def sample_delete_channel(): # Create a client - client = live_stream_v1.LivestreamServiceClient() + client = live_stream_v1.LivestreamServiceAsyncClient() # Initialize request argument(s) request = live_stream_v1.DeleteChannelRequest( @@ -614,7 +614,7 @@ def sample_delete_channel(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -722,9 +722,9 @@ async def update_channel( from google.cloud.video import live_stream_v1 - def sample_update_channel(): + async def sample_update_channel(): # Create a client - client = live_stream_v1.LivestreamServiceClient() + client = live_stream_v1.LivestreamServiceAsyncClient() # Initialize request argument(s) request = live_stream_v1.UpdateChannelRequest( @@ -735,7 +735,7 @@ def sample_update_channel(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -859,9 +859,9 @@ async def start_channel( from google.cloud.video import live_stream_v1 - def sample_start_channel(): + async def sample_start_channel(): # Create a client - client = live_stream_v1.LivestreamServiceClient() + client = live_stream_v1.LivestreamServiceAsyncClient() # Initialize request argument(s) request = live_stream_v1.StartChannelRequest( @@ -873,7 +873,7 @@ def sample_start_channel(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -973,9 +973,9 @@ async def stop_channel( from google.cloud.video import live_stream_v1 - def sample_stop_channel(): + async def sample_stop_channel(): # Create a client - client = live_stream_v1.LivestreamServiceClient() + client = live_stream_v1.LivestreamServiceAsyncClient() # Initialize request argument(s) request = live_stream_v1.StopChannelRequest( @@ -987,7 +987,7 @@ def sample_stop_channel(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1088,9 +1088,9 @@ async def create_input( from google.cloud.video import live_stream_v1 - def sample_create_input(): + async def sample_create_input(): # Create a client - client = live_stream_v1.LivestreamServiceClient() + client = live_stream_v1.LivestreamServiceAsyncClient() # Initialize request argument(s) request = live_stream_v1.CreateInputRequest( @@ -1103,7 +1103,7 @@ def sample_create_input(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1217,9 +1217,9 @@ async def list_inputs( from google.cloud.video import live_stream_v1 - def sample_list_inputs(): + async def sample_list_inputs(): # Create a client - client = live_stream_v1.LivestreamServiceClient() + client = live_stream_v1.LivestreamServiceAsyncClient() # Initialize request argument(s) request = live_stream_v1.ListInputsRequest( @@ -1230,7 +1230,7 @@ def sample_list_inputs(): page_result = client.list_inputs(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -1334,9 +1334,9 @@ async def get_input( from google.cloud.video import live_stream_v1 - def sample_get_input(): + async def sample_get_input(): # Create a client - client = live_stream_v1.LivestreamServiceClient() + client = live_stream_v1.LivestreamServiceAsyncClient() # Initialize request argument(s) request = live_stream_v1.GetInputRequest( @@ -1344,7 +1344,7 @@ def sample_get_input(): ) # Make the request - response = client.get_input(request=request) + response = await client.get_input(request=request) # Handle the response print(response) @@ -1440,9 +1440,9 @@ async def delete_input( from google.cloud.video import live_stream_v1 - def sample_delete_input(): + async def sample_delete_input(): # Create a client - client = live_stream_v1.LivestreamServiceClient() + client = live_stream_v1.LivestreamServiceAsyncClient() # Initialize request argument(s) request = live_stream_v1.DeleteInputRequest( @@ -1454,7 +1454,7 @@ def sample_delete_input(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1562,9 +1562,9 @@ async def update_input( from google.cloud.video import live_stream_v1 - def sample_update_input(): + async def sample_update_input(): # Create a client - client = live_stream_v1.LivestreamServiceClient() + client = live_stream_v1.LivestreamServiceAsyncClient() # Initialize request argument(s) request = live_stream_v1.UpdateInputRequest( @@ -1575,7 +1575,7 @@ def sample_update_input(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1692,9 +1692,9 @@ async def create_event( from google.cloud.video import live_stream_v1 - def sample_create_event(): + async def sample_create_event(): # Create a client - client = live_stream_v1.LivestreamServiceClient() + client = live_stream_v1.LivestreamServiceAsyncClient() # Initialize request argument(s) request = live_stream_v1.CreateEventRequest( @@ -1703,7 +1703,7 @@ def sample_create_event(): ) # Make the request - response = client.create_event(request=request) + response = await client.create_event(request=request) # Handle the response print(response) @@ -1811,9 +1811,9 @@ async def list_events( from google.cloud.video import live_stream_v1 - def sample_list_events(): + async def sample_list_events(): # Create a client - client = live_stream_v1.LivestreamServiceClient() + client = live_stream_v1.LivestreamServiceAsyncClient() # Initialize request argument(s) request = live_stream_v1.ListEventsRequest( @@ -1824,7 +1824,7 @@ def sample_list_events(): page_result = client.list_events(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -1929,9 +1929,9 @@ async def get_event( from google.cloud.video import live_stream_v1 - def sample_get_event(): + async def sample_get_event(): # Create a client - client = live_stream_v1.LivestreamServiceClient() + client = live_stream_v1.LivestreamServiceAsyncClient() # Initialize request argument(s) request = live_stream_v1.GetEventRequest( @@ -1939,7 +1939,7 @@ def sample_get_event(): ) # Make the request - response = client.get_event(request=request) + response = await client.get_event(request=request) # Handle the response print(response) @@ -2036,9 +2036,9 @@ async def delete_event( from google.cloud.video import live_stream_v1 - def sample_delete_event(): + async def sample_delete_event(): # Create a client - client = live_stream_v1.LivestreamServiceClient() + client = live_stream_v1.LivestreamServiceAsyncClient() # Initialize request argument(s) request = live_stream_v1.DeleteEventRequest( @@ -2046,7 +2046,7 @@ def sample_delete_event(): ) # Make the request - client.delete_event(request=request) + await client.delete_event(request=request) Args: request (Union[google.cloud.video.live_stream_v1.types.DeleteEventRequest, dict]): diff --git a/packages/google-cloud-video-live-stream/tests/unit/gapic/live_stream_v1/test_livestream_service.py b/packages/google-cloud-video-live-stream/tests/unit/gapic/live_stream_v1/test_livestream_service.py index 273bbbdbd841..2c46b0e23b4f 100644 --- a/packages/google-cloud-video-live-stream/tests/unit/gapic/live_stream_v1/test_livestream_service.py +++ b/packages/google-cloud-video-live-stream/tests/unit/gapic/live_stream_v1/test_livestream_service.py @@ -765,7 +765,7 @@ def test_create_channel_field_headers(): # a field header. Set these to a non-empty value. request = service.CreateChannelRequest() - 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_channel_), "__call__") as call: @@ -781,7 +781,7 @@ def test_create_channel_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -795,7 +795,7 @@ async def test_create_channel_field_headers_async(): # a field header. Set these to a non-empty value. request = service.CreateChannelRequest() - 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_channel_), "__call__") as call: @@ -813,7 +813,7 @@ async def test_create_channel_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1021,7 +1021,7 @@ def test_list_channels_field_headers(): # a field header. Set these to a non-empty value. request = service.ListChannelsRequest() - 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_channels), "__call__") as call: @@ -1037,7 +1037,7 @@ def test_list_channels_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1051,7 +1051,7 @@ async def test_list_channels_field_headers_async(): # a field header. Set these to a non-empty value. request = service.ListChannelsRequest() - 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_channels), "__call__") as call: @@ -1069,7 +1069,7 @@ async def test_list_channels_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1200,7 +1200,7 @@ def test_list_channels_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, resources.Channel) for i in results) @@ -1449,7 +1449,7 @@ def test_get_channel_field_headers(): # a field header. Set these to a non-empty value. request = service.GetChannelRequest() - 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_channel), "__call__") as call: @@ -1465,7 +1465,7 @@ def test_get_channel_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1479,7 +1479,7 @@ async def test_get_channel_field_headers_async(): # a field header. Set these to a non-empty value. request = service.GetChannelRequest() - 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_channel), "__call__") as call: @@ -1495,7 +1495,7 @@ async def test_get_channel_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1671,7 +1671,7 @@ def test_delete_channel_field_headers(): # a field header. Set these to a non-empty value. request = service.DeleteChannelRequest() - 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_channel), "__call__") as call: @@ -1687,7 +1687,7 @@ def test_delete_channel_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1701,7 +1701,7 @@ async def test_delete_channel_field_headers_async(): # a field header. Set these to a non-empty value. request = service.DeleteChannelRequest() - 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_channel), "__call__") as call: @@ -1719,7 +1719,7 @@ async def test_delete_channel_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1897,7 +1897,7 @@ def test_update_channel_field_headers(): # a field header. Set these to a non-empty value. request = service.UpdateChannelRequest() - request.channel.name = "channel.name/value" + request.channel.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_channel), "__call__") as call: @@ -1913,7 +1913,7 @@ def test_update_channel_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "channel.name=channel.name/value", + "channel.name=name_value", ) in kw["metadata"] @@ -1927,7 +1927,7 @@ async def test_update_channel_field_headers_async(): # a field header. Set these to a non-empty value. request = service.UpdateChannelRequest() - request.channel.name = "channel.name/value" + request.channel.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_channel), "__call__") as call: @@ -1945,7 +1945,7 @@ async def test_update_channel_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "channel.name=channel.name/value", + "channel.name=name_value", ) in kw["metadata"] @@ -2133,7 +2133,7 @@ def test_start_channel_field_headers(): # a field header. Set these to a non-empty value. request = service.StartChannelRequest() - 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.start_channel), "__call__") as call: @@ -2149,7 +2149,7 @@ def test_start_channel_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2163,7 +2163,7 @@ async def test_start_channel_field_headers_async(): # a field header. Set these to a non-empty value. request = service.StartChannelRequest() - 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.start_channel), "__call__") as call: @@ -2181,7 +2181,7 @@ async def test_start_channel_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2359,7 +2359,7 @@ def test_stop_channel_field_headers(): # a field header. Set these to a non-empty value. request = service.StopChannelRequest() - 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.stop_channel), "__call__") as call: @@ -2375,7 +2375,7 @@ def test_stop_channel_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2389,7 +2389,7 @@ async def test_stop_channel_field_headers_async(): # a field header. Set these to a non-empty value. request = service.StopChannelRequest() - 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.stop_channel), "__call__") as call: @@ -2407,7 +2407,7 @@ async def test_stop_channel_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2585,7 +2585,7 @@ def test_create_input_field_headers(): # a field header. Set these to a non-empty value. request = service.CreateInputRequest() - 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_input), "__call__") as call: @@ -2601,7 +2601,7 @@ def test_create_input_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2615,7 +2615,7 @@ async def test_create_input_field_headers_async(): # a field header. Set these to a non-empty value. request = service.CreateInputRequest() - 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_input), "__call__") as call: @@ -2633,7 +2633,7 @@ async def test_create_input_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2841,7 +2841,7 @@ def test_list_inputs_field_headers(): # a field header. Set these to a non-empty value. request = service.ListInputsRequest() - 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_inputs), "__call__") as call: @@ -2857,7 +2857,7 @@ def test_list_inputs_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2871,7 +2871,7 @@ async def test_list_inputs_field_headers_async(): # a field header. Set these to a non-empty value. request = service.ListInputsRequest() - 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_inputs), "__call__") as call: @@ -2889,7 +2889,7 @@ async def test_list_inputs_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3020,7 +3020,7 @@ def test_list_inputs_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, resources.Input) for i in results) @@ -3273,7 +3273,7 @@ def test_get_input_field_headers(): # a field header. Set these to a non-empty value. request = service.GetInputRequest() - 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_input), "__call__") as call: @@ -3289,7 +3289,7 @@ def test_get_input_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3303,7 +3303,7 @@ async def test_get_input_field_headers_async(): # a field header. Set these to a non-empty value. request = service.GetInputRequest() - 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_input), "__call__") as call: @@ -3319,7 +3319,7 @@ async def test_get_input_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3495,7 +3495,7 @@ def test_delete_input_field_headers(): # a field header. Set these to a non-empty value. request = service.DeleteInputRequest() - 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_input), "__call__") as call: @@ -3511,7 +3511,7 @@ def test_delete_input_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3525,7 +3525,7 @@ async def test_delete_input_field_headers_async(): # a field header. Set these to a non-empty value. request = service.DeleteInputRequest() - 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_input), "__call__") as call: @@ -3543,7 +3543,7 @@ async def test_delete_input_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3721,7 +3721,7 @@ def test_update_input_field_headers(): # a field header. Set these to a non-empty value. request = service.UpdateInputRequest() - request.input.name = "input.name/value" + request.input.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_input), "__call__") as call: @@ -3737,7 +3737,7 @@ def test_update_input_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "input.name=input.name/value", + "input.name=name_value", ) in kw["metadata"] @@ -3751,7 +3751,7 @@ async def test_update_input_field_headers_async(): # a field header. Set these to a non-empty value. request = service.UpdateInputRequest() - request.input.name = "input.name/value" + request.input.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_input), "__call__") as call: @@ -3769,7 +3769,7 @@ async def test_update_input_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "input.name=input.name/value", + "input.name=name_value", ) in kw["metadata"] @@ -3974,7 +3974,7 @@ def test_create_event_field_headers(): # a field header. Set these to a non-empty value. request = service.CreateEventRequest() - 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_event), "__call__") as call: @@ -3990,7 +3990,7 @@ def test_create_event_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -4004,7 +4004,7 @@ async def test_create_event_field_headers_async(): # a field header. Set these to a non-empty value. request = service.CreateEventRequest() - 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_event), "__call__") as call: @@ -4020,7 +4020,7 @@ async def test_create_event_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -4226,7 +4226,7 @@ def test_list_events_field_headers(): # a field header. Set these to a non-empty value. request = service.ListEventsRequest() - 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_events), "__call__") as call: @@ -4242,7 +4242,7 @@ def test_list_events_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -4256,7 +4256,7 @@ async def test_list_events_field_headers_async(): # a field header. Set these to a non-empty value. request = service.ListEventsRequest() - 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_events), "__call__") as call: @@ -4274,7 +4274,7 @@ async def test_list_events_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -4405,7 +4405,7 @@ def test_list_events_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, resources.Event) for i in results) @@ -4657,7 +4657,7 @@ def test_get_event_field_headers(): # a field header. Set these to a non-empty value. request = service.GetEventRequest() - 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_event), "__call__") as call: @@ -4673,7 +4673,7 @@ def test_get_event_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4687,7 +4687,7 @@ async def test_get_event_field_headers_async(): # a field header. Set these to a non-empty value. request = service.GetEventRequest() - 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_event), "__call__") as call: @@ -4703,7 +4703,7 @@ async def test_get_event_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4877,7 +4877,7 @@ def test_delete_event_field_headers(): # a field header. Set these to a non-empty value. request = service.DeleteEventRequest() - 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_event), "__call__") as call: @@ -4893,7 +4893,7 @@ def test_delete_event_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4907,7 +4907,7 @@ async def test_delete_event_field_headers_async(): # a field header. Set these to a non-empty value. request = service.DeleteEventRequest() - 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_event), "__call__") as call: @@ -4923,7 +4923,7 @@ async def test_delete_event_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"]