From 8eb166567aeda42fc688fca977d19dd4d1f458a4 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:23:02 -0400 Subject: [PATCH] chore: use gapic-generator-python 0.65.2 (#169) 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 --- .../contact_center_insights/async_client.py | 204 ++++++------- .../test_contact_center_insights.py | 280 +++++++++--------- 2 files changed, 242 insertions(+), 242 deletions(-) diff --git a/packages/google-cloud-contact-center-insights/google/cloud/contact_center_insights_v1/services/contact_center_insights/async_client.py b/packages/google-cloud-contact-center-insights/google/cloud/contact_center_insights_v1/services/contact_center_insights/async_client.py index 19cd5f31b1e8..f3168eb2781e 100644 --- a/packages/google-cloud-contact-center-insights/google/cloud/contact_center_insights_v1/services/contact_center_insights/async_client.py +++ b/packages/google-cloud-contact-center-insights/google/cloud/contact_center_insights_v1/services/contact_center_insights/async_client.py @@ -259,9 +259,9 @@ async def create_conversation( from google.cloud import contact_center_insights_v1 - def sample_create_conversation(): + async def sample_create_conversation(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.CreateConversationRequest( @@ -269,7 +269,7 @@ def sample_create_conversation(): ) # Make the request - response = client.create_conversation(request=request) + response = await client.create_conversation(request=request) # Handle the response print(response) @@ -376,16 +376,16 @@ async def update_conversation( from google.cloud import contact_center_insights_v1 - def sample_update_conversation(): + async def sample_update_conversation(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.UpdateConversationRequest( ) # Make the request - response = client.update_conversation(request=request) + response = await client.update_conversation(request=request) # Handle the response print(response) @@ -477,9 +477,9 @@ async def get_conversation( from google.cloud import contact_center_insights_v1 - def sample_get_conversation(): + async def sample_get_conversation(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.GetConversationRequest( @@ -487,7 +487,7 @@ def sample_get_conversation(): ) # Make the request - response = client.get_conversation(request=request) + response = await client.get_conversation(request=request) # Handle the response print(response) @@ -569,9 +569,9 @@ async def list_conversations( from google.cloud import contact_center_insights_v1 - def sample_list_conversations(): + async def sample_list_conversations(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.ListConversationsRequest( @@ -582,7 +582,7 @@ def sample_list_conversations(): page_result = client.list_conversations(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -676,9 +676,9 @@ async def delete_conversation( from google.cloud import contact_center_insights_v1 - def sample_delete_conversation(): + async def sample_delete_conversation(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.DeleteConversationRequest( @@ -686,7 +686,7 @@ def sample_delete_conversation(): ) # Make the request - client.delete_conversation(request=request) + await client.delete_conversation(request=request) Args: request (Union[google.cloud.contact_center_insights_v1.types.DeleteConversationRequest, dict]): @@ -761,9 +761,9 @@ async def create_analysis( from google.cloud import contact_center_insights_v1 - def sample_create_analysis(): + async def sample_create_analysis(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.CreateAnalysisRequest( @@ -775,7 +775,7 @@ def sample_create_analysis(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -877,9 +877,9 @@ async def get_analysis( from google.cloud import contact_center_insights_v1 - def sample_get_analysis(): + async def sample_get_analysis(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.GetAnalysisRequest( @@ -887,7 +887,7 @@ def sample_get_analysis(): ) # Make the request - response = client.get_analysis(request=request) + response = await client.get_analysis(request=request) # Handle the response print(response) @@ -969,9 +969,9 @@ async def list_analyses( from google.cloud import contact_center_insights_v1 - def sample_list_analyses(): + async def sample_list_analyses(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.ListAnalysesRequest( @@ -982,7 +982,7 @@ def sample_list_analyses(): page_result = client.list_analyses(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -1075,9 +1075,9 @@ async def delete_analysis( from google.cloud import contact_center_insights_v1 - def sample_delete_analysis(): + async def sample_delete_analysis(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.DeleteAnalysisRequest( @@ -1085,7 +1085,7 @@ def sample_delete_analysis(): ) # Make the request - client.delete_analysis(request=request) + await client.delete_analysis(request=request) Args: request (Union[google.cloud.contact_center_insights_v1.types.DeleteAnalysisRequest, dict]): @@ -1158,9 +1158,9 @@ async def export_insights_data( from google.cloud import contact_center_insights_v1 - def sample_export_insights_data(): + async def sample_export_insights_data(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) big_query_destination = contact_center_insights_v1.BigQueryDestination() @@ -1176,7 +1176,7 @@ def sample_export_insights_data(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1272,9 +1272,9 @@ async def create_issue_model( from google.cloud import contact_center_insights_v1 - def sample_create_issue_model(): + async def sample_create_issue_model(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.CreateIssueModelRequest( @@ -1286,7 +1286,7 @@ def sample_create_issue_model(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1390,16 +1390,16 @@ async def update_issue_model( from google.cloud import contact_center_insights_v1 - def sample_update_issue_model(): + async def sample_update_issue_model(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.UpdateIssueModelRequest( ) # Make the request - response = client.update_issue_model(request=request) + response = await client.update_issue_model(request=request) # Handle the response print(response) @@ -1491,9 +1491,9 @@ async def get_issue_model( from google.cloud import contact_center_insights_v1 - def sample_get_issue_model(): + async def sample_get_issue_model(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.GetIssueModelRequest( @@ -1501,7 +1501,7 @@ def sample_get_issue_model(): ) # Make the request - response = client.get_issue_model(request=request) + response = await client.get_issue_model(request=request) # Handle the response print(response) @@ -1583,9 +1583,9 @@ async def list_issue_models( from google.cloud import contact_center_insights_v1 - def sample_list_issue_models(): + async def sample_list_issue_models(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.ListIssueModelsRequest( @@ -1593,7 +1593,7 @@ def sample_list_issue_models(): ) # Make the request - response = client.list_issue_models(request=request) + response = await client.list_issue_models(request=request) # Handle the response print(response) @@ -1675,9 +1675,9 @@ async def delete_issue_model( from google.cloud import contact_center_insights_v1 - def sample_delete_issue_model(): + async def sample_delete_issue_model(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.DeleteIssueModelRequest( @@ -1689,7 +1689,7 @@ def sample_delete_issue_model(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1797,9 +1797,9 @@ async def deploy_issue_model( from google.cloud import contact_center_insights_v1 - def sample_deploy_issue_model(): + async def sample_deploy_issue_model(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.DeployIssueModelRequest( @@ -1811,7 +1811,7 @@ def sample_deploy_issue_model(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1907,9 +1907,9 @@ async def undeploy_issue_model( from google.cloud import contact_center_insights_v1 - def sample_undeploy_issue_model(): + async def sample_undeploy_issue_model(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.UndeployIssueModelRequest( @@ -1921,7 +1921,7 @@ def sample_undeploy_issue_model(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -2017,9 +2017,9 @@ async def get_issue( from google.cloud import contact_center_insights_v1 - def sample_get_issue(): + async def sample_get_issue(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.GetIssueRequest( @@ -2027,7 +2027,7 @@ def sample_get_issue(): ) # Make the request - response = client.get_issue(request=request) + response = await client.get_issue(request=request) # Handle the response print(response) @@ -2109,9 +2109,9 @@ async def list_issues( from google.cloud import contact_center_insights_v1 - def sample_list_issues(): + async def sample_list_issues(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.ListIssuesRequest( @@ -2119,7 +2119,7 @@ def sample_list_issues(): ) # Make the request - response = client.list_issues(request=request) + response = await client.list_issues(request=request) # Handle the response print(response) @@ -2202,16 +2202,16 @@ async def update_issue( from google.cloud import contact_center_insights_v1 - def sample_update_issue(): + async def sample_update_issue(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.UpdateIssueRequest( ) # Make the request - response = client.update_issue(request=request) + response = await client.update_issue(request=request) # Handle the response print(response) @@ -2304,9 +2304,9 @@ async def calculate_issue_model_stats( from google.cloud import contact_center_insights_v1 - def sample_calculate_issue_model_stats(): + async def sample_calculate_issue_model_stats(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.CalculateIssueModelStatsRequest( @@ -2314,7 +2314,7 @@ def sample_calculate_issue_model_stats(): ) # Make the request - response = client.calculate_issue_model_stats(request=request) + response = await client.calculate_issue_model_stats(request=request) # Handle the response print(response) @@ -2402,9 +2402,9 @@ async def create_phrase_matcher( from google.cloud import contact_center_insights_v1 - def sample_create_phrase_matcher(): + async def sample_create_phrase_matcher(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) phrase_matcher = contact_center_insights_v1.PhraseMatcher() @@ -2416,7 +2416,7 @@ def sample_create_phrase_matcher(): ) # Make the request - response = client.create_phrase_matcher(request=request) + response = await client.create_phrase_matcher(request=request) # Handle the response print(response) @@ -2510,9 +2510,9 @@ async def get_phrase_matcher( from google.cloud import contact_center_insights_v1 - def sample_get_phrase_matcher(): + async def sample_get_phrase_matcher(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.GetPhraseMatcherRequest( @@ -2520,7 +2520,7 @@ def sample_get_phrase_matcher(): ) # Make the request - response = client.get_phrase_matcher(request=request) + response = await client.get_phrase_matcher(request=request) # Handle the response print(response) @@ -2603,9 +2603,9 @@ async def list_phrase_matchers( from google.cloud import contact_center_insights_v1 - def sample_list_phrase_matchers(): + async def sample_list_phrase_matchers(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.ListPhraseMatchersRequest( @@ -2616,7 +2616,7 @@ def sample_list_phrase_matchers(): page_result = client.list_phrase_matchers(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -2710,9 +2710,9 @@ async def delete_phrase_matcher( from google.cloud import contact_center_insights_v1 - def sample_delete_phrase_matcher(): + async def sample_delete_phrase_matcher(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.DeletePhraseMatcherRequest( @@ -2720,7 +2720,7 @@ def sample_delete_phrase_matcher(): ) # Make the request - client.delete_phrase_matcher(request=request) + await client.delete_phrase_matcher(request=request) Args: request (Union[google.cloud.contact_center_insights_v1.types.DeletePhraseMatcherRequest, dict]): @@ -2794,9 +2794,9 @@ async def update_phrase_matcher( from google.cloud import contact_center_insights_v1 - def sample_update_phrase_matcher(): + async def sample_update_phrase_matcher(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) phrase_matcher = contact_center_insights_v1.PhraseMatcher() @@ -2807,7 +2807,7 @@ def sample_update_phrase_matcher(): ) # Make the request - response = client.update_phrase_matcher(request=request) + response = await client.update_phrase_matcher(request=request) # Handle the response print(response) @@ -2899,9 +2899,9 @@ async def calculate_stats( from google.cloud import contact_center_insights_v1 - def sample_calculate_stats(): + async def sample_calculate_stats(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.CalculateStatsRequest( @@ -2909,7 +2909,7 @@ def sample_calculate_stats(): ) # Make the request - response = client.calculate_stats(request=request) + response = await client.calculate_stats(request=request) # Handle the response print(response) @@ -2994,9 +2994,9 @@ async def get_settings( from google.cloud import contact_center_insights_v1 - def sample_get_settings(): + async def sample_get_settings(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.GetSettingsRequest( @@ -3004,7 +3004,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) @@ -3088,16 +3088,16 @@ async def update_settings( from google.cloud import contact_center_insights_v1 - def sample_update_settings(): + async def sample_update_settings(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.UpdateSettingsRequest( ) # Make the request - response = client.update_settings(request=request) + response = await client.update_settings(request=request) # Handle the response print(response) @@ -3190,9 +3190,9 @@ async def create_view( from google.cloud import contact_center_insights_v1 - def sample_create_view(): + async def sample_create_view(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.CreateViewRequest( @@ -3200,7 +3200,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) @@ -3293,9 +3293,9 @@ async def get_view( from google.cloud import contact_center_insights_v1 - def sample_get_view(): + async def sample_get_view(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.GetViewRequest( @@ -3303,7 +3303,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) @@ -3385,9 +3385,9 @@ async def list_views( from google.cloud import contact_center_insights_v1 - def sample_list_views(): + async def sample_list_views(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.ListViewsRequest( @@ -3398,7 +3398,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: @@ -3492,16 +3492,16 @@ async def update_view( from google.cloud import contact_center_insights_v1 - def sample_update_view(): + async def sample_update_view(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.UpdateViewRequest( ) # Make the request - response = client.update_view(request=request) + response = await client.update_view(request=request) # Handle the response print(response) @@ -3590,9 +3590,9 @@ async def delete_view( from google.cloud import contact_center_insights_v1 - def sample_delete_view(): + async def sample_delete_view(): # Create a client - client = contact_center_insights_v1.ContactCenterInsightsClient() + client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() # Initialize request argument(s) request = contact_center_insights_v1.DeleteViewRequest( @@ -3600,7 +3600,7 @@ def sample_delete_view(): ) # Make the request - client.delete_view(request=request) + await client.delete_view(request=request) Args: request (Union[google.cloud.contact_center_insights_v1.types.DeleteViewRequest, dict]): diff --git a/packages/google-cloud-contact-center-insights/tests/unit/gapic/contact_center_insights_v1/test_contact_center_insights.py b/packages/google-cloud-contact-center-insights/tests/unit/gapic/contact_center_insights_v1/test_contact_center_insights.py index 77bff3f84cb4..3d5b46d1410f 100644 --- a/packages/google-cloud-contact-center-insights/tests/unit/gapic/contact_center_insights_v1/test_contact_center_insights.py +++ b/packages/google-cloud-contact-center-insights/tests/unit/gapic/contact_center_insights_v1/test_contact_center_insights.py @@ -809,7 +809,7 @@ def test_create_conversation_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.CreateConversationRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -827,7 +827,7 @@ def test_create_conversation_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -841,7 +841,7 @@ async def test_create_conversation_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.CreateConversationRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -861,7 +861,7 @@ async def test_create_conversation_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1110,7 +1110,7 @@ def test_update_conversation_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.UpdateConversationRequest() - request.conversation.name = "conversation.name/value" + request.conversation.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1128,7 +1128,7 @@ def test_update_conversation_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "conversation.name=conversation.name/value", + "conversation.name=name_value", ) in kw["metadata"] @@ -1142,7 +1142,7 @@ async def test_update_conversation_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.UpdateConversationRequest() - request.conversation.name = "conversation.name/value" + request.conversation.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1162,7 +1162,7 @@ async def test_update_conversation_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "conversation.name=conversation.name/value", + "conversation.name=name_value", ) in kw["metadata"] @@ -1395,7 +1395,7 @@ def test_get_conversation_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.GetConversationRequest() - 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_conversation), "__call__") as call: @@ -1411,7 +1411,7 @@ def test_get_conversation_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1425,7 +1425,7 @@ async def test_get_conversation_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.GetConversationRequest() - 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_conversation), "__call__") as call: @@ -1443,7 +1443,7 @@ async def test_get_conversation_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1634,7 +1634,7 @@ def test_list_conversations_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.ListConversationsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1652,7 +1652,7 @@ def test_list_conversations_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1666,7 +1666,7 @@ async def test_list_conversations_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.ListConversationsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1686,7 +1686,7 @@ async def test_list_conversations_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1823,7 +1823,7 @@ def test_list_conversations_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.Conversation) for i in results) @@ -2069,7 +2069,7 @@ def test_delete_conversation_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.DeleteConversationRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2087,7 +2087,7 @@ def test_delete_conversation_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2101,7 +2101,7 @@ async def test_delete_conversation_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.DeleteConversationRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2119,7 +2119,7 @@ async def test_delete_conversation_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2300,7 +2300,7 @@ def test_create_analysis_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.CreateAnalysisRequest() - 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_analysis), "__call__") as call: @@ -2316,7 +2316,7 @@ def test_create_analysis_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2330,7 +2330,7 @@ async def test_create_analysis_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.CreateAnalysisRequest() - 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_analysis), "__call__") as call: @@ -2348,7 +2348,7 @@ async def test_create_analysis_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2543,7 +2543,7 @@ def test_get_analysis_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.GetAnalysisRequest() - 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_analysis), "__call__") as call: @@ -2559,7 +2559,7 @@ def test_get_analysis_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2573,7 +2573,7 @@ async def test_get_analysis_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.GetAnalysisRequest() - 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_analysis), "__call__") as call: @@ -2589,7 +2589,7 @@ async def test_get_analysis_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2772,7 +2772,7 @@ def test_list_analyses_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.ListAnalysesRequest() - 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_analyses), "__call__") as call: @@ -2788,7 +2788,7 @@ def test_list_analyses_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2802,7 +2802,7 @@ async def test_list_analyses_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.ListAnalysesRequest() - 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_analyses), "__call__") as call: @@ -2820,7 +2820,7 @@ async def test_list_analyses_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2951,7 +2951,7 @@ def test_list_analyses_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.Analysis) for i in results) @@ -3185,7 +3185,7 @@ def test_delete_analysis_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.DeleteAnalysisRequest() - 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_analysis), "__call__") as call: @@ -3201,7 +3201,7 @@ def test_delete_analysis_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3215,7 +3215,7 @@ async def test_delete_analysis_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.DeleteAnalysisRequest() - 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_analysis), "__call__") as call: @@ -3231,7 +3231,7 @@ async def test_delete_analysis_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3414,7 +3414,7 @@ def test_export_insights_data_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.ExportInsightsDataRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3432,7 +3432,7 @@ def test_export_insights_data_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3446,7 +3446,7 @@ async def test_export_insights_data_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.ExportInsightsDataRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3466,7 +3466,7 @@ async def test_export_insights_data_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3655,7 +3655,7 @@ def test_create_issue_model_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.CreateIssueModelRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3673,7 +3673,7 @@ def test_create_issue_model_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3687,7 +3687,7 @@ async def test_create_issue_model_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.CreateIssueModelRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3707,7 +3707,7 @@ async def test_create_issue_model_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3920,7 +3920,7 @@ def test_update_issue_model_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.UpdateIssueModelRequest() - request.issue_model.name = "issue_model.name/value" + request.issue_model.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3938,7 +3938,7 @@ def test_update_issue_model_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "issue_model.name=issue_model.name/value", + "issue_model.name=name_value", ) in kw["metadata"] @@ -3952,7 +3952,7 @@ async def test_update_issue_model_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.UpdateIssueModelRequest() - request.issue_model.name = "issue_model.name/value" + request.issue_model.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3972,7 +3972,7 @@ async def test_update_issue_model_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "issue_model.name=issue_model.name/value", + "issue_model.name=name_value", ) in kw["metadata"] @@ -4179,7 +4179,7 @@ def test_get_issue_model_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.GetIssueModelRequest() - 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_issue_model), "__call__") as call: @@ -4195,7 +4195,7 @@ def test_get_issue_model_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4209,7 +4209,7 @@ async def test_get_issue_model_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.GetIssueModelRequest() - 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_issue_model), "__call__") as call: @@ -4227,7 +4227,7 @@ async def test_get_issue_model_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4412,7 +4412,7 @@ def test_list_issue_models_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.ListIssueModelsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4430,7 +4430,7 @@ def test_list_issue_models_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -4444,7 +4444,7 @@ async def test_list_issue_models_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.ListIssueModelsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4464,7 +4464,7 @@ async def test_list_issue_models_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_delete_issue_model_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.DeleteIssueModelRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4671,7 +4671,7 @@ def test_delete_issue_model_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4685,7 +4685,7 @@ async def test_delete_issue_model_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.DeleteIssueModelRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4705,7 +4705,7 @@ async def test_delete_issue_model_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4894,7 +4894,7 @@ def test_deploy_issue_model_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.DeployIssueModelRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4912,7 +4912,7 @@ def test_deploy_issue_model_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4926,7 +4926,7 @@ async def test_deploy_issue_model_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.DeployIssueModelRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4946,7 +4946,7 @@ async def test_deploy_issue_model_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -5135,7 +5135,7 @@ def test_undeploy_issue_model_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.UndeployIssueModelRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5153,7 +5153,7 @@ def test_undeploy_issue_model_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -5167,7 +5167,7 @@ async def test_undeploy_issue_model_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.UndeployIssueModelRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5187,7 +5187,7 @@ async def test_undeploy_issue_model_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -5380,7 +5380,7 @@ def test_get_issue_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.GetIssueRequest() - 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_issue), "__call__") as call: @@ -5396,7 +5396,7 @@ def test_get_issue_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -5410,7 +5410,7 @@ async def test_get_issue_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.GetIssueRequest() - 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_issue), "__call__") as call: @@ -5426,7 +5426,7 @@ async def test_get_issue_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -5603,7 +5603,7 @@ def test_list_issues_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.ListIssuesRequest() - 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_issues), "__call__") as call: @@ -5619,7 +5619,7 @@ def test_list_issues_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -5633,7 +5633,7 @@ async def test_list_issues_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.ListIssuesRequest() - 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_issues), "__call__") as call: @@ -5651,7 +5651,7 @@ async def test_list_issues_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -5840,7 +5840,7 @@ def test_update_issue_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.UpdateIssueRequest() - request.issue.name = "issue.name/value" + request.issue.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_issue), "__call__") as call: @@ -5856,7 +5856,7 @@ def test_update_issue_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "issue.name=issue.name/value", + "issue.name=name_value", ) in kw["metadata"] @@ -5870,7 +5870,7 @@ async def test_update_issue_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.UpdateIssueRequest() - request.issue.name = "issue.name/value" + request.issue.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_issue), "__call__") as call: @@ -5886,7 +5886,7 @@ async def test_update_issue_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "issue.name=issue.name/value", + "issue.name=name_value", ) in kw["metadata"] @@ -6083,7 +6083,7 @@ def test_calculate_issue_model_stats_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.CalculateIssueModelStatsRequest() - request.issue_model = "issue_model/value" + request.issue_model = "issue_model_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6101,7 +6101,7 @@ def test_calculate_issue_model_stats_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "issue_model=issue_model/value", + "issue_model=issue_model_value", ) in kw["metadata"] @@ -6115,7 +6115,7 @@ async def test_calculate_issue_model_stats_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.CalculateIssueModelStatsRequest() - request.issue_model = "issue_model/value" + request.issue_model = "issue_model_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6135,7 +6135,7 @@ async def test_calculate_issue_model_stats_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "issue_model=issue_model/value", + "issue_model=issue_model_value", ) in kw["metadata"] @@ -6354,7 +6354,7 @@ def test_create_phrase_matcher_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.CreatePhraseMatcherRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6372,7 +6372,7 @@ def test_create_phrase_matcher_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -6386,7 +6386,7 @@ async def test_create_phrase_matcher_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.CreatePhraseMatcherRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6406,7 +6406,7 @@ async def test_create_phrase_matcher_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -6635,7 +6635,7 @@ def test_get_phrase_matcher_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.GetPhraseMatcherRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6653,7 +6653,7 @@ def test_get_phrase_matcher_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -6667,7 +6667,7 @@ async def test_get_phrase_matcher_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.GetPhraseMatcherRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6687,7 +6687,7 @@ async def test_get_phrase_matcher_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -6882,7 +6882,7 @@ def test_list_phrase_matchers_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.ListPhraseMatchersRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6900,7 +6900,7 @@ def test_list_phrase_matchers_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -6914,7 +6914,7 @@ async def test_list_phrase_matchers_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.ListPhraseMatchersRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6934,7 +6934,7 @@ async def test_list_phrase_matchers_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -7071,7 +7071,7 @@ def test_list_phrase_matchers_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.PhraseMatcher) for i in results) @@ -7317,7 +7317,7 @@ def test_delete_phrase_matcher_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.DeletePhraseMatcherRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -7335,7 +7335,7 @@ def test_delete_phrase_matcher_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -7349,7 +7349,7 @@ async def test_delete_phrase_matcher_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.DeletePhraseMatcherRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -7367,7 +7367,7 @@ async def test_delete_phrase_matcher_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -7584,7 +7584,7 @@ def test_update_phrase_matcher_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.UpdatePhraseMatcherRequest() - request.phrase_matcher.name = "phrase_matcher.name/value" + request.phrase_matcher.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -7602,7 +7602,7 @@ def test_update_phrase_matcher_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "phrase_matcher.name=phrase_matcher.name/value", + "phrase_matcher.name=name_value", ) in kw["metadata"] @@ -7616,7 +7616,7 @@ async def test_update_phrase_matcher_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.UpdatePhraseMatcherRequest() - request.phrase_matcher.name = "phrase_matcher.name/value" + request.phrase_matcher.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -7636,7 +7636,7 @@ async def test_update_phrase_matcher_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "phrase_matcher.name=phrase_matcher.name/value", + "phrase_matcher.name=name_value", ) in kw["metadata"] @@ -7839,7 +7839,7 @@ def test_calculate_stats_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.CalculateStatsRequest() - request.location = "location/value" + request.location = "location_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.calculate_stats), "__call__") as call: @@ -7855,7 +7855,7 @@ def test_calculate_stats_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "location=location/value", + "location=location_value", ) in kw["metadata"] @@ -7869,7 +7869,7 @@ async def test_calculate_stats_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.CalculateStatsRequest() - request.location = "location/value" + request.location = "location_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.calculate_stats), "__call__") as call: @@ -7887,7 +7887,7 @@ async def test_calculate_stats_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "location=location/value", + "location=location_value", ) in kw["metadata"] @@ -8076,7 +8076,7 @@ def test_get_settings_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.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: @@ -8092,7 +8092,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"] @@ -8106,7 +8106,7 @@ async def test_get_settings_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.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: @@ -8122,7 +8122,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"] @@ -8309,7 +8309,7 @@ def test_update_settings_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.UpdateSettingsRequest() - request.settings.name = "settings.name/value" + request.settings.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: @@ -8325,7 +8325,7 @@ def test_update_settings_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "settings.name=settings.name/value", + "settings.name=name_value", ) in kw["metadata"] @@ -8339,7 +8339,7 @@ async def test_update_settings_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.UpdateSettingsRequest() - request.settings.name = "settings.name/value" + request.settings.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: @@ -8355,7 +8355,7 @@ async def test_update_settings_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "settings.name=settings.name/value", + "settings.name=name_value", ) in kw["metadata"] @@ -8556,7 +8556,7 @@ def test_create_view_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.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: @@ -8572,7 +8572,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"] @@ -8586,7 +8586,7 @@ async def test_create_view_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.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: @@ -8602,7 +8602,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"] @@ -8802,7 +8802,7 @@ def test_get_view_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.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: @@ -8818,7 +8818,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"] @@ -8832,7 +8832,7 @@ async def test_get_view_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.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: @@ -8848,7 +8848,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"] @@ -9031,7 +9031,7 @@ def test_list_views_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.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: @@ -9047,7 +9047,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"] @@ -9061,7 +9061,7 @@ async def test_list_views_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.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: @@ -9079,7 +9079,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"] @@ -9210,7 +9210,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, resources.View) for i in results) @@ -9460,7 +9460,7 @@ def test_update_view_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.UpdateViewRequest() - request.view.name = "view.name/value" + request.view.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: @@ -9476,7 +9476,7 @@ def test_update_view_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "view.name=view.name/value", + "view.name=name_value", ) in kw["metadata"] @@ -9490,7 +9490,7 @@ async def test_update_view_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.UpdateViewRequest() - request.view.name = "view.name/value" + request.view.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: @@ -9506,7 +9506,7 @@ async def test_update_view_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "view.name=view.name/value", + "view.name=name_value", ) in kw["metadata"] @@ -9691,7 +9691,7 @@ def test_delete_view_field_headers(): # a field header. Set these to a non-empty value. request = contact_center_insights.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: @@ -9707,7 +9707,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"] @@ -9721,7 +9721,7 @@ async def test_delete_view_field_headers_async(): # a field header. Set these to a non-empty value. request = contact_center_insights.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: @@ -9737,7 +9737,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"]