From 9380167b3a966f88f7caad6dc5f4b6a164dc4684 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 28 Apr 2022 07:35:44 -0400 Subject: [PATCH] chore: use gapic-generator-python 0.65.2 (#175) 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 --- .../services/grafeas/async_client.py | 84 ++++++------- .../unit/gapic/grafeas_v1/test_grafeas.py | 118 +++++++++--------- 2 files changed, 101 insertions(+), 101 deletions(-) diff --git a/packages/grafeas/grafeas/grafeas_v1/services/grafeas/async_client.py b/packages/grafeas/grafeas/grafeas_v1/services/grafeas/async_client.py index 4f9d0018f78f..debf2b17c92e 100644 --- a/packages/grafeas/grafeas/grafeas_v1/services/grafeas/async_client.py +++ b/packages/grafeas/grafeas/grafeas_v1/services/grafeas/async_client.py @@ -158,9 +158,9 @@ async def get_occurrence( from grafeas import grafeas_v1 - def sample_get_occurrence(): + async def sample_get_occurrence(): # Create a client - client = grafeas_v1.GrafeasClient() + client = grafeas_v1.GrafeasAsyncClient() # Initialize request argument(s) request = grafeas_v1.GetOccurrenceRequest( @@ -168,7 +168,7 @@ def sample_get_occurrence(): ) # Make the request - response = client.get_occurrence(request=request) + response = await client.get_occurrence(request=request) # Handle the response print(response) @@ -263,9 +263,9 @@ async def list_occurrences( from grafeas import grafeas_v1 - def sample_list_occurrences(): + async def sample_list_occurrences(): # Create a client - client = grafeas_v1.GrafeasClient() + client = grafeas_v1.GrafeasAsyncClient() # Initialize request argument(s) request = grafeas_v1.ListOccurrencesRequest( @@ -276,7 +276,7 @@ def sample_list_occurrences(): page_result = client.list_occurrences(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -388,9 +388,9 @@ async def delete_occurrence( from grafeas import grafeas_v1 - def sample_delete_occurrence(): + async def sample_delete_occurrence(): # Create a client - client = grafeas_v1.GrafeasClient() + client = grafeas_v1.GrafeasAsyncClient() # Initialize request argument(s) request = grafeas_v1.DeleteOccurrenceRequest( @@ -398,7 +398,7 @@ def sample_delete_occurrence(): ) # Make the request - client.delete_occurrence(request=request) + await client.delete_occurrence(request=request) Args: request (Union[grafeas.grafeas_v1.types.DeleteOccurrenceRequest, dict]): @@ -481,9 +481,9 @@ async def create_occurrence( from grafeas import grafeas_v1 - def sample_create_occurrence(): + async def sample_create_occurrence(): # Create a client - client = grafeas_v1.GrafeasClient() + client = grafeas_v1.GrafeasAsyncClient() # Initialize request argument(s) request = grafeas_v1.CreateOccurrenceRequest( @@ -491,7 +491,7 @@ def sample_create_occurrence(): ) # Make the request - response = client.create_occurrence(request=request) + response = await client.create_occurrence(request=request) # Handle the response print(response) @@ -584,9 +584,9 @@ async def batch_create_occurrences( from grafeas import grafeas_v1 - def sample_batch_create_occurrences(): + async def sample_batch_create_occurrences(): # Create a client - client = grafeas_v1.GrafeasClient() + client = grafeas_v1.GrafeasAsyncClient() # Initialize request argument(s) request = grafeas_v1.BatchCreateOccurrencesRequest( @@ -594,7 +594,7 @@ def sample_batch_create_occurrences(): ) # Make the request - response = client.batch_create_occurrences(request=request) + response = await client.batch_create_occurrences(request=request) # Handle the response print(response) @@ -691,9 +691,9 @@ async def update_occurrence( from grafeas import grafeas_v1 - def sample_update_occurrence(): + async def sample_update_occurrence(): # Create a client - client = grafeas_v1.GrafeasClient() + client = grafeas_v1.GrafeasAsyncClient() # Initialize request argument(s) request = grafeas_v1.UpdateOccurrenceRequest( @@ -701,7 +701,7 @@ def sample_update_occurrence(): ) # Make the request - response = client.update_occurrence(request=request) + response = await client.update_occurrence(request=request) # Handle the response print(response) @@ -801,9 +801,9 @@ async def get_occurrence_note( from grafeas import grafeas_v1 - def sample_get_occurrence_note(): + async def sample_get_occurrence_note(): # Create a client - client = grafeas_v1.GrafeasClient() + client = grafeas_v1.GrafeasAsyncClient() # Initialize request argument(s) request = grafeas_v1.GetOccurrenceNoteRequest( @@ -811,7 +811,7 @@ def sample_get_occurrence_note(): ) # Make the request - response = client.get_occurrence_note(request=request) + response = await client.get_occurrence_note(request=request) # Handle the response print(response) @@ -906,9 +906,9 @@ async def get_note( from grafeas import grafeas_v1 - def sample_get_note(): + async def sample_get_note(): # Create a client - client = grafeas_v1.GrafeasClient() + client = grafeas_v1.GrafeasAsyncClient() # Initialize request argument(s) request = grafeas_v1.GetNoteRequest( @@ -916,7 +916,7 @@ def sample_get_note(): ) # Make the request - response = client.get_note(request=request) + response = await client.get_note(request=request) # Handle the response print(response) @@ -1011,9 +1011,9 @@ async def list_notes( from grafeas import grafeas_v1 - def sample_list_notes(): + async def sample_list_notes(): # Create a client - client = grafeas_v1.GrafeasClient() + client = grafeas_v1.GrafeasAsyncClient() # Initialize request argument(s) request = grafeas_v1.ListNotesRequest( @@ -1024,7 +1024,7 @@ def sample_list_notes(): page_result = client.list_notes(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -1134,9 +1134,9 @@ async def delete_note( from grafeas import grafeas_v1 - def sample_delete_note(): + async def sample_delete_note(): # Create a client - client = grafeas_v1.GrafeasClient() + client = grafeas_v1.GrafeasAsyncClient() # Initialize request argument(s) request = grafeas_v1.DeleteNoteRequest( @@ -1144,7 +1144,7 @@ def sample_delete_note(): ) # Make the request - client.delete_note(request=request) + await client.delete_note(request=request) Args: request (Union[grafeas.grafeas_v1.types.DeleteNoteRequest, dict]): @@ -1228,9 +1228,9 @@ async def create_note( from grafeas import grafeas_v1 - def sample_create_note(): + async def sample_create_note(): # Create a client - client = grafeas_v1.GrafeasClient() + client = grafeas_v1.GrafeasAsyncClient() # Initialize request argument(s) request = grafeas_v1.CreateNoteRequest( @@ -1239,7 +1239,7 @@ def sample_create_note(): ) # Make the request - response = client.create_note(request=request) + response = await client.create_note(request=request) # Handle the response print(response) @@ -1339,9 +1339,9 @@ async def batch_create_notes( from grafeas import grafeas_v1 - def sample_batch_create_notes(): + async def sample_batch_create_notes(): # Create a client - client = grafeas_v1.GrafeasClient() + client = grafeas_v1.GrafeasAsyncClient() # Initialize request argument(s) request = grafeas_v1.BatchCreateNotesRequest( @@ -1349,7 +1349,7 @@ def sample_batch_create_notes(): ) # Make the request - response = client.batch_create_notes(request=request) + response = await client.batch_create_notes(request=request) # Handle the response print(response) @@ -1444,9 +1444,9 @@ async def update_note( from grafeas import grafeas_v1 - def sample_update_note(): + async def sample_update_note(): # Create a client - client = grafeas_v1.GrafeasClient() + client = grafeas_v1.GrafeasAsyncClient() # Initialize request argument(s) request = grafeas_v1.UpdateNoteRequest( @@ -1454,7 +1454,7 @@ def sample_update_note(): ) # Make the request - response = client.update_note(request=request) + response = await client.update_note(request=request) # Handle the response print(response) @@ -1556,9 +1556,9 @@ async def list_note_occurrences( from grafeas import grafeas_v1 - def sample_list_note_occurrences(): + async def sample_list_note_occurrences(): # Create a client - client = grafeas_v1.GrafeasClient() + client = grafeas_v1.GrafeasAsyncClient() # Initialize request argument(s) request = grafeas_v1.ListNoteOccurrencesRequest( @@ -1569,7 +1569,7 @@ def sample_list_note_occurrences(): page_result = client.list_note_occurrences(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: diff --git a/packages/grafeas/tests/unit/gapic/grafeas_v1/test_grafeas.py b/packages/grafeas/tests/unit/gapic/grafeas_v1/test_grafeas.py index 80b1d5f049fb..6b7f9f9564d9 100644 --- a/packages/grafeas/tests/unit/gapic/grafeas_v1/test_grafeas.py +++ b/packages/grafeas/tests/unit/gapic/grafeas_v1/test_grafeas.py @@ -175,7 +175,7 @@ def test_get_occurrence_field_headers(): # a field header. Set these to a non-empty value. request = grafeas.GetOccurrenceRequest() - 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_occurrence), "__call__") as call: @@ -191,7 +191,7 @@ def test_get_occurrence_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -203,7 +203,7 @@ async def test_get_occurrence_field_headers_async(): # a field header. Set these to a non-empty value. request = grafeas.GetOccurrenceRequest() - 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_occurrence), "__call__") as call: @@ -219,7 +219,7 @@ async def test_get_occurrence_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -388,7 +388,7 @@ def test_list_occurrences_field_headers(): # a field header. Set these to a non-empty value. request = grafeas.ListOccurrencesRequest() - 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_occurrences), "__call__") as call: @@ -404,7 +404,7 @@ def test_list_occurrences_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -416,7 +416,7 @@ async def test_list_occurrences_field_headers_async(): # a field header. Set these to a non-empty value. request = grafeas.ListOccurrencesRequest() - 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_occurrences), "__call__") as call: @@ -434,7 +434,7 @@ async def test_list_occurrences_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -566,7 +566,7 @@ def test_list_occurrences_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, grafeas.Occurrence) for i in results) @@ -795,7 +795,7 @@ def test_delete_occurrence_field_headers(): # a field header. Set these to a non-empty value. request = grafeas.DeleteOccurrenceRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -813,7 +813,7 @@ def test_delete_occurrence_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -825,7 +825,7 @@ async def test_delete_occurrence_field_headers_async(): # a field header. Set these to a non-empty value. request = grafeas.DeleteOccurrenceRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -843,7 +843,7 @@ async def test_delete_occurrence_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1039,7 +1039,7 @@ def test_create_occurrence_field_headers(): # a field header. Set these to a non-empty value. request = grafeas.CreateOccurrenceRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1057,7 +1057,7 @@ def test_create_occurrence_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1069,7 +1069,7 @@ async def test_create_occurrence_field_headers_async(): # a field header. Set these to a non-empty value. request = grafeas.CreateOccurrenceRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1087,7 +1087,7 @@ async def test_create_occurrence_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1270,7 +1270,7 @@ def test_batch_create_occurrences_field_headers(): # a field header. Set these to a non-empty value. request = grafeas.BatchCreateOccurrencesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1288,7 +1288,7 @@ def test_batch_create_occurrences_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1300,7 +1300,7 @@ async def test_batch_create_occurrences_field_headers_async(): # a field header. Set these to a non-empty value. request = grafeas.BatchCreateOccurrencesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1320,7 +1320,7 @@ async def test_batch_create_occurrences_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1528,7 +1528,7 @@ def test_update_occurrence_field_headers(): # a field header. Set these to a non-empty value. request = grafeas.UpdateOccurrenceRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1546,7 +1546,7 @@ def test_update_occurrence_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1558,7 +1558,7 @@ async def test_update_occurrence_field_headers_async(): # a field header. Set these to a non-empty value. request = grafeas.UpdateOccurrenceRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1576,7 +1576,7 @@ async def test_update_occurrence_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1792,7 +1792,7 @@ def test_get_occurrence_note_field_headers(): # a field header. Set these to a non-empty value. request = grafeas.GetOccurrenceNoteRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1810,7 +1810,7 @@ def test_get_occurrence_note_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1822,7 +1822,7 @@ async def test_get_occurrence_note_field_headers_async(): # a field header. Set these to a non-empty value. request = grafeas.GetOccurrenceNoteRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1840,7 +1840,7 @@ async def test_get_occurrence_note_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2030,7 +2030,7 @@ def test_get_note_field_headers(): # a field header. Set these to a non-empty value. request = grafeas.GetNoteRequest() - 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_note), "__call__") as call: @@ -2046,7 +2046,7 @@ def test_get_note_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2058,7 +2058,7 @@ async def test_get_note_field_headers_async(): # a field header. Set these to a non-empty value. request = grafeas.GetNoteRequest() - 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_note), "__call__") as call: @@ -2074,7 +2074,7 @@ async def test_get_note_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2243,7 +2243,7 @@ def test_list_notes_field_headers(): # a field header. Set these to a non-empty value. request = grafeas.ListNotesRequest() - 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_notes), "__call__") as call: @@ -2259,7 +2259,7 @@ def test_list_notes_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2271,7 +2271,7 @@ async def test_list_notes_field_headers_async(): # a field header. Set these to a non-empty value. request = grafeas.ListNotesRequest() - 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_notes), "__call__") as call: @@ -2289,7 +2289,7 @@ async def test_list_notes_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2421,7 +2421,7 @@ def test_list_notes_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, grafeas.Note) for i in results) @@ -2644,7 +2644,7 @@ def test_delete_note_field_headers(): # a field header. Set these to a non-empty value. request = grafeas.DeleteNoteRequest() - 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_note), "__call__") as call: @@ -2660,7 +2660,7 @@ def test_delete_note_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2672,7 +2672,7 @@ async def test_delete_note_field_headers_async(): # a field header. Set these to a non-empty value. request = grafeas.DeleteNoteRequest() - 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_note), "__call__") as call: @@ -2688,7 +2688,7 @@ async def test_delete_note_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2874,7 +2874,7 @@ def test_create_note_field_headers(): # a field header. Set these to a non-empty value. request = grafeas.CreateNoteRequest() - 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_note), "__call__") as call: @@ -2890,7 +2890,7 @@ def test_create_note_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2902,7 +2902,7 @@ async def test_create_note_field_headers_async(): # a field header. Set these to a non-empty value. request = grafeas.CreateNoteRequest() - 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_note), "__call__") as call: @@ -2918,7 +2918,7 @@ async def test_create_note_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3107,7 +3107,7 @@ def test_batch_create_notes_field_headers(): # a field header. Set these to a non-empty value. request = grafeas.BatchCreateNotesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3125,7 +3125,7 @@ def test_batch_create_notes_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3137,7 +3137,7 @@ async def test_batch_create_notes_field_headers_async(): # a field header. Set these to a non-empty value. request = grafeas.BatchCreateNotesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3157,7 +3157,7 @@ async def test_batch_create_notes_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3359,7 +3359,7 @@ def test_update_note_field_headers(): # a field header. Set these to a non-empty value. request = grafeas.UpdateNoteRequest() - 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_note), "__call__") as call: @@ -3375,7 +3375,7 @@ def test_update_note_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3387,7 +3387,7 @@ async def test_update_note_field_headers_async(): # a field header. Set these to a non-empty value. request = grafeas.UpdateNoteRequest() - 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_note), "__call__") as call: @@ -3403,7 +3403,7 @@ async def test_update_note_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3598,7 +3598,7 @@ def test_list_note_occurrences_field_headers(): # a field header. Set these to a non-empty value. request = grafeas.ListNoteOccurrencesRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3616,7 +3616,7 @@ def test_list_note_occurrences_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3628,7 +3628,7 @@ async def test_list_note_occurrences_field_headers_async(): # a field header. Set these to a non-empty value. request = grafeas.ListNoteOccurrencesRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3648,7 +3648,7 @@ async def test_list_note_occurrences_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3786,7 +3786,7 @@ def test_list_note_occurrences_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, grafeas.Occurrence) for i in results)