From cc8e11796dce6eff184e051e1ab9515e35afa87b 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 08:14:52 -0400 Subject: [PATCH] feat(v3): added audio_export_settings (#300) 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 * feat: added audio_export_settings PiperOrigin-RevId: 444644952 Source-Link: https://github.com/googleapis/googleapis/commit/4bd299a6f47c40491987577ff8b01f303b7a2c26 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cd15ee9b95feb65bd9fd31160c7d5f3cbdb35d40 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2QxNWVlOWI5NWZlYjY1YmQ5ZmQzMTE2MGM3ZDVmM2NiZGIzNWQ0MCJ9 * 🦉 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/agents/async_client.py | 54 +++++----- .../services/changelogs/async_client.py | 12 +-- .../services/deployments/async_client.py | 12 +-- .../services/entity_types/async_client.py | 30 +++--- .../services/environments/async_client.py | 54 +++++----- .../services/experiments/async_client.py | 42 ++++---- .../services/flows/async_client.py | 60 +++++------ .../services/intents/async_client.py | 30 +++--- .../services/pages/async_client.py | 30 +++--- .../security_settings_service/async_client.py | 30 +++--- .../session_entity_types/async_client.py | 30 +++--- .../services/sessions/async_client.py | 26 ++--- .../services/test_cases/async_client.py | 72 ++++++------- .../transition_route_groups/async_client.py | 30 +++--- .../services/versions/async_client.py | 42 ++++---- .../services/webhooks/async_client.py | 30 +++--- .../types/security_settings.py | 71 +++++++++++++ .../services/agents/async_client.py | 54 +++++----- .../services/changelogs/async_client.py | 12 +-- .../services/deployments/async_client.py | 12 +-- .../services/entity_types/async_client.py | 30 +++--- .../services/environments/async_client.py | 54 +++++----- .../services/experiments/async_client.py | 42 ++++---- .../services/flows/async_client.py | 60 +++++------ .../services/intents/async_client.py | 30 +++--- .../services/pages/async_client.py | 30 +++--- .../security_settings_service/async_client.py | 30 +++--- .../session_entity_types/async_client.py | 30 +++--- .../services/sessions/async_client.py | 26 ++--- .../services/test_cases/async_client.py | 72 ++++++------- .../transition_route_groups/async_client.py | 30 +++--- .../services/versions/async_client.py | 42 ++++---- .../services/webhooks/async_client.py | 30 +++--- .../unit/gapic/dialogflowcx_v3/test_agents.py | 74 ++++++------- .../gapic/dialogflowcx_v3/test_changelogs.py | 18 ++-- .../gapic/dialogflowcx_v3/test_deployments.py | 18 ++-- .../dialogflowcx_v3/test_entity_types.py | 42 ++++---- .../dialogflowcx_v3/test_environments.py | 78 +++++++------- .../gapic/dialogflowcx_v3/test_experiments.py | 58 +++++----- .../unit/gapic/dialogflowcx_v3/test_flows.py | 82 +++++++------- .../gapic/dialogflowcx_v3/test_intents.py | 42 ++++---- .../unit/gapic/dialogflowcx_v3/test_pages.py | 42 ++++---- .../test_security_settings_service.py | 42 ++++---- .../test_session_entity_types.py | 42 ++++---- .../gapic/dialogflowcx_v3/test_sessions.py | 24 ++--- .../gapic/dialogflowcx_v3/test_test_cases.py | 100 +++++++++--------- .../test_transition_route_groups.py | 42 ++++---- .../gapic/dialogflowcx_v3/test_versions.py | 58 +++++----- .../gapic/dialogflowcx_v3/test_webhooks.py | 42 ++++---- .../gapic/dialogflowcx_v3beta1/test_agents.py | 74 ++++++------- .../dialogflowcx_v3beta1/test_changelogs.py | 18 ++-- .../dialogflowcx_v3beta1/test_deployments.py | 18 ++-- .../dialogflowcx_v3beta1/test_entity_types.py | 42 ++++---- .../dialogflowcx_v3beta1/test_environments.py | 78 +++++++------- .../dialogflowcx_v3beta1/test_experiments.py | 58 +++++----- .../gapic/dialogflowcx_v3beta1/test_flows.py | 82 +++++++------- .../dialogflowcx_v3beta1/test_intents.py | 42 ++++---- .../gapic/dialogflowcx_v3beta1/test_pages.py | 42 ++++---- .../test_security_settings_service.py | 42 ++++---- .../test_session_entity_types.py | 42 ++++---- .../dialogflowcx_v3beta1/test_sessions.py | 24 ++--- .../dialogflowcx_v3beta1/test_test_cases.py | 100 +++++++++--------- .../test_transition_route_groups.py | 42 ++++---- .../dialogflowcx_v3beta1/test_versions.py | 58 +++++----- .../dialogflowcx_v3beta1/test_webhooks.py | 42 ++++---- 65 files changed, 1459 insertions(+), 1388 deletions(-) diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/agents/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/agents/async_client.py index 275a7e3f747b..297946cd111d 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/agents/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/agents/async_client.py @@ -234,9 +234,9 @@ async def list_agents( from google.cloud import dialogflowcx_v3 - def sample_list_agents(): + async def sample_list_agents(): # Create a client - client = dialogflowcx_v3.AgentsClient() + client = dialogflowcx_v3.AgentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.ListAgentsRequest( @@ -247,7 +247,7 @@ def sample_list_agents(): page_result = client.list_agents(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -342,9 +342,9 @@ async def get_agent( from google.cloud import dialogflowcx_v3 - def sample_get_agent(): + async def sample_get_agent(): # Create a client - client = dialogflowcx_v3.AgentsClient() + client = dialogflowcx_v3.AgentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.GetAgentRequest( @@ -352,7 +352,7 @@ def sample_get_agent(): ) # Make the request - response = client.get_agent(request=request) + response = await client.get_agent(request=request) # Handle the response print(response) @@ -454,9 +454,9 @@ async def create_agent( from google.cloud import dialogflowcx_v3 - def sample_create_agent(): + async def sample_create_agent(): # Create a client - client = dialogflowcx_v3.AgentsClient() + client = dialogflowcx_v3.AgentsAsyncClient() # Initialize request argument(s) agent = dialogflowcx_v3.Agent() @@ -470,7 +470,7 @@ def sample_create_agent(): ) # Make the request - response = client.create_agent(request=request) + response = await client.create_agent(request=request) # Handle the response print(response) @@ -579,9 +579,9 @@ async def update_agent( from google.cloud import dialogflowcx_v3 - def sample_update_agent(): + async def sample_update_agent(): # Create a client - client = dialogflowcx_v3.AgentsClient() + client = dialogflowcx_v3.AgentsAsyncClient() # Initialize request argument(s) agent = dialogflowcx_v3.Agent() @@ -594,7 +594,7 @@ def sample_update_agent(): ) # Make the request - response = client.update_agent(request=request) + response = await client.update_agent(request=request) # Handle the response print(response) @@ -701,9 +701,9 @@ async def delete_agent( from google.cloud import dialogflowcx_v3 - def sample_delete_agent(): + async def sample_delete_agent(): # Create a client - client = dialogflowcx_v3.AgentsClient() + client = dialogflowcx_v3.AgentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.DeleteAgentRequest( @@ -711,7 +711,7 @@ def sample_delete_agent(): ) # Make the request - client.delete_agent(request=request) + await client.delete_agent(request=request) Args: request (Union[google.cloud.dialogflowcx_v3.types.DeleteAgentRequest, dict]): @@ -793,9 +793,9 @@ async def export_agent( from google.cloud import dialogflowcx_v3 - def sample_export_agent(): + async def sample_export_agent(): # Create a client - client = dialogflowcx_v3.AgentsClient() + client = dialogflowcx_v3.AgentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.ExportAgentRequest( @@ -807,7 +807,7 @@ def sample_export_agent(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -900,9 +900,9 @@ async def restore_agent( from google.cloud import dialogflowcx_v3 - def sample_restore_agent(): + async def sample_restore_agent(): # Create a client - client = dialogflowcx_v3.AgentsClient() + client = dialogflowcx_v3.AgentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.RestoreAgentRequest( @@ -915,7 +915,7 @@ def sample_restore_agent(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1002,9 +1002,9 @@ async def validate_agent( from google.cloud import dialogflowcx_v3 - def sample_validate_agent(): + async def sample_validate_agent(): # Create a client - client = dialogflowcx_v3.AgentsClient() + client = dialogflowcx_v3.AgentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.ValidateAgentRequest( @@ -1012,7 +1012,7 @@ def sample_validate_agent(): ) # Make the request - response = client.validate_agent(request=request) + response = await client.validate_agent(request=request) # Handle the response print(response) @@ -1077,9 +1077,9 @@ async def get_agent_validation_result( from google.cloud import dialogflowcx_v3 - def sample_get_agent_validation_result(): + async def sample_get_agent_validation_result(): # Create a client - client = dialogflowcx_v3.AgentsClient() + client = dialogflowcx_v3.AgentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.GetAgentValidationResultRequest( @@ -1087,7 +1087,7 @@ def sample_get_agent_validation_result(): ) # Make the request - response = client.get_agent_validation_result(request=request) + response = await client.get_agent_validation_result(request=request) # Handle the response print(response) diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/changelogs/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/changelogs/async_client.py index 7cfc65263ff8..d0069f9d923e 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/changelogs/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/changelogs/async_client.py @@ -214,9 +214,9 @@ async def list_changelogs( from google.cloud import dialogflowcx_v3 - def sample_list_changelogs(): + async def sample_list_changelogs(): # Create a client - client = dialogflowcx_v3.ChangelogsClient() + client = dialogflowcx_v3.ChangelogsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.ListChangelogsRequest( @@ -227,7 +227,7 @@ def sample_list_changelogs(): page_result = client.list_changelogs(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -322,9 +322,9 @@ async def get_changelog( from google.cloud import dialogflowcx_v3 - def sample_get_changelog(): + async def sample_get_changelog(): # Create a client - client = dialogflowcx_v3.ChangelogsClient() + client = dialogflowcx_v3.ChangelogsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.GetChangelogRequest( @@ -332,7 +332,7 @@ def sample_get_changelog(): ) # Make the request - response = client.get_changelog(request=request) + response = await client.get_changelog(request=request) # Handle the response print(response) diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/deployments/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/deployments/async_client.py index 170211c88a35..8a5fac760200 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/deployments/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/deployments/async_client.py @@ -225,9 +225,9 @@ async def list_deployments( from google.cloud import dialogflowcx_v3 - def sample_list_deployments(): + async def sample_list_deployments(): # Create a client - client = dialogflowcx_v3.DeploymentsClient() + client = dialogflowcx_v3.DeploymentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.ListDeploymentsRequest( @@ -238,7 +238,7 @@ def sample_list_deployments(): page_result = client.list_deployments(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -336,9 +336,9 @@ async def get_deployment( from google.cloud import dialogflowcx_v3 - def sample_get_deployment(): + async def sample_get_deployment(): # Create a client - client = dialogflowcx_v3.DeploymentsClient() + client = dialogflowcx_v3.DeploymentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.GetDeploymentRequest( @@ -346,7 +346,7 @@ def sample_get_deployment(): ) # Make the request - response = client.get_deployment(request=request) + response = await client.get_deployment(request=request) # Handle the response print(response) diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/entity_types/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/entity_types/async_client.py index 8f1cdfaefcb8..ab7447db9665 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/entity_types/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/entity_types/async_client.py @@ -218,9 +218,9 @@ async def list_entity_types( from google.cloud import dialogflowcx_v3 - def sample_list_entity_types(): + async def sample_list_entity_types(): # Create a client - client = dialogflowcx_v3.EntityTypesClient() + client = dialogflowcx_v3.EntityTypesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.ListEntityTypesRequest( @@ -231,7 +231,7 @@ def sample_list_entity_types(): page_result = client.list_entity_types(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -327,9 +327,9 @@ async def get_entity_type( from google.cloud import dialogflowcx_v3 - def sample_get_entity_type(): + async def sample_get_entity_type(): # Create a client - client = dialogflowcx_v3.EntityTypesClient() + client = dialogflowcx_v3.EntityTypesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.GetEntityTypeRequest( @@ -337,7 +337,7 @@ def sample_get_entity_type(): ) # Make the request - response = client.get_entity_type(request=request) + response = await client.get_entity_type(request=request) # Handle the response print(response) @@ -459,9 +459,9 @@ async def create_entity_type( from google.cloud import dialogflowcx_v3 - def sample_create_entity_type(): + async def sample_create_entity_type(): # Create a client - client = dialogflowcx_v3.EntityTypesClient() + client = dialogflowcx_v3.EntityTypesAsyncClient() # Initialize request argument(s) entity_type = dialogflowcx_v3.EntityType() @@ -474,7 +474,7 @@ def sample_create_entity_type(): ) # Make the request - response = client.create_entity_type(request=request) + response = await client.create_entity_type(request=request) # Handle the response print(response) @@ -603,9 +603,9 @@ async def update_entity_type( from google.cloud import dialogflowcx_v3 - def sample_update_entity_type(): + async def sample_update_entity_type(): # Create a client - client = dialogflowcx_v3.EntityTypesClient() + client = dialogflowcx_v3.EntityTypesAsyncClient() # Initialize request argument(s) entity_type = dialogflowcx_v3.EntityType() @@ -617,7 +617,7 @@ def sample_update_entity_type(): ) # Make the request - response = client.update_entity_type(request=request) + response = await client.update_entity_type(request=request) # Handle the response print(response) @@ -747,9 +747,9 @@ async def delete_entity_type( from google.cloud import dialogflowcx_v3 - def sample_delete_entity_type(): + async def sample_delete_entity_type(): # Create a client - client = dialogflowcx_v3.EntityTypesClient() + client = dialogflowcx_v3.EntityTypesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.DeleteEntityTypeRequest( @@ -757,7 +757,7 @@ def sample_delete_entity_type(): ) # Make the request - client.delete_entity_type(request=request) + await client.delete_entity_type(request=request) Args: request (Union[google.cloud.dialogflowcx_v3.types.DeleteEntityTypeRequest, dict]): diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/environments/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/environments/async_client.py index a04fd32b0cb4..35797efa263e 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/environments/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/environments/async_client.py @@ -236,9 +236,9 @@ async def list_environments( from google.cloud import dialogflowcx_v3 - def sample_list_environments(): + async def sample_list_environments(): # Create a client - client = dialogflowcx_v3.EnvironmentsClient() + client = dialogflowcx_v3.EnvironmentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.ListEnvironmentsRequest( @@ -249,7 +249,7 @@ def sample_list_environments(): page_result = client.list_environments(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -347,9 +347,9 @@ async def get_environment( from google.cloud import dialogflowcx_v3 - def sample_get_environment(): + async def sample_get_environment(): # Create a client - client = dialogflowcx_v3.EnvironmentsClient() + client = dialogflowcx_v3.EnvironmentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.GetEnvironmentRequest( @@ -357,7 +357,7 @@ def sample_get_environment(): ) # Make the request - response = client.get_environment(request=request) + response = await client.get_environment(request=request) # Handle the response print(response) @@ -470,9 +470,9 @@ async def create_environment( from google.cloud import dialogflowcx_v3 - def sample_create_environment(): + async def sample_create_environment(): # Create a client - client = dialogflowcx_v3.EnvironmentsClient() + client = dialogflowcx_v3.EnvironmentsAsyncClient() # Initialize request argument(s) environment = dialogflowcx_v3.Environment() @@ -489,7 +489,7 @@ def sample_create_environment(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -616,9 +616,9 @@ async def update_environment( from google.cloud import dialogflowcx_v3 - def sample_update_environment(): + async def sample_update_environment(): # Create a client - client = dialogflowcx_v3.EnvironmentsClient() + client = dialogflowcx_v3.EnvironmentsAsyncClient() # Initialize request argument(s) environment = dialogflowcx_v3.Environment() @@ -634,7 +634,7 @@ def sample_update_environment(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -748,9 +748,9 @@ async def delete_environment( from google.cloud import dialogflowcx_v3 - def sample_delete_environment(): + async def sample_delete_environment(): # Create a client - client = dialogflowcx_v3.EnvironmentsClient() + client = dialogflowcx_v3.EnvironmentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.DeleteEnvironmentRequest( @@ -758,7 +758,7 @@ def sample_delete_environment(): ) # Make the request - client.delete_environment(request=request) + await client.delete_environment(request=request) Args: request (Union[google.cloud.dialogflowcx_v3.types.DeleteEnvironmentRequest, dict]): @@ -834,9 +834,9 @@ async def lookup_environment_history( from google.cloud import dialogflowcx_v3 - def sample_lookup_environment_history(): + async def sample_lookup_environment_history(): # Create a client - client = dialogflowcx_v3.EnvironmentsClient() + client = dialogflowcx_v3.EnvironmentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.LookupEnvironmentHistoryRequest( @@ -847,7 +847,7 @@ def sample_lookup_environment_history(): page_result = client.lookup_environment_history(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -953,9 +953,9 @@ async def run_continuous_test( from google.cloud import dialogflowcx_v3 - def sample_run_continuous_test(): + async def sample_run_continuous_test(): # Create a client - client = dialogflowcx_v3.EnvironmentsClient() + client = dialogflowcx_v3.EnvironmentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.RunContinuousTestRequest( @@ -967,7 +967,7 @@ def sample_run_continuous_test(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1046,9 +1046,9 @@ async def list_continuous_test_results( from google.cloud import dialogflowcx_v3 - def sample_list_continuous_test_results(): + async def sample_list_continuous_test_results(): # Create a client - client = dialogflowcx_v3.EnvironmentsClient() + client = dialogflowcx_v3.EnvironmentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.ListContinuousTestResultsRequest( @@ -1059,7 +1059,7 @@ def sample_list_continuous_test_results(): page_result = client.list_continuous_test_results(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -1164,9 +1164,9 @@ async def deploy_flow( from google.cloud import dialogflowcx_v3 - def sample_deploy_flow(): + async def sample_deploy_flow(): # Create a client - client = dialogflowcx_v3.EnvironmentsClient() + client = dialogflowcx_v3.EnvironmentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.DeployFlowRequest( @@ -1179,7 +1179,7 @@ def sample_deploy_flow(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/experiments/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/experiments/async_client.py index 6c43e31f998d..27c66ec28aa6 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/experiments/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/experiments/async_client.py @@ -222,9 +222,9 @@ async def list_experiments( from google.cloud import dialogflowcx_v3 - def sample_list_experiments(): + async def sample_list_experiments(): # Create a client - client = dialogflowcx_v3.ExperimentsClient() + client = dialogflowcx_v3.ExperimentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.ListExperimentsRequest( @@ -235,7 +235,7 @@ def sample_list_experiments(): page_result = client.list_experiments(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -333,9 +333,9 @@ async def get_experiment( from google.cloud import dialogflowcx_v3 - def sample_get_experiment(): + async def sample_get_experiment(): # Create a client - client = dialogflowcx_v3.ExperimentsClient() + client = dialogflowcx_v3.ExperimentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.GetExperimentRequest( @@ -343,7 +343,7 @@ def sample_get_experiment(): ) # Make the request - response = client.get_experiment(request=request) + response = await client.get_experiment(request=request) # Handle the response print(response) @@ -434,9 +434,9 @@ async def create_experiment( from google.cloud import dialogflowcx_v3 - def sample_create_experiment(): + async def sample_create_experiment(): # Create a client - client = dialogflowcx_v3.ExperimentsClient() + client = dialogflowcx_v3.ExperimentsAsyncClient() # Initialize request argument(s) experiment = dialogflowcx_v3.Experiment() @@ -448,7 +448,7 @@ def sample_create_experiment(): ) # Make the request - response = client.create_experiment(request=request) + response = await client.create_experiment(request=request) # Handle the response print(response) @@ -546,9 +546,9 @@ async def update_experiment( from google.cloud import dialogflowcx_v3 - def sample_update_experiment(): + async def sample_update_experiment(): # Create a client - client = dialogflowcx_v3.ExperimentsClient() + client = dialogflowcx_v3.ExperimentsAsyncClient() # Initialize request argument(s) experiment = dialogflowcx_v3.Experiment() @@ -559,7 +559,7 @@ def sample_update_experiment(): ) # Make the request - response = client.update_experiment(request=request) + response = await client.update_experiment(request=request) # Handle the response print(response) @@ -654,9 +654,9 @@ async def delete_experiment( from google.cloud import dialogflowcx_v3 - def sample_delete_experiment(): + async def sample_delete_experiment(): # Create a client - client = dialogflowcx_v3.ExperimentsClient() + client = dialogflowcx_v3.ExperimentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.DeleteExperimentRequest( @@ -664,7 +664,7 @@ def sample_delete_experiment(): ) # Make the request - client.delete_experiment(request=request) + await client.delete_experiment(request=request) Args: request (Union[google.cloud.dialogflowcx_v3.types.DeleteExperimentRequest, dict]): @@ -741,9 +741,9 @@ async def start_experiment( from google.cloud import dialogflowcx_v3 - def sample_start_experiment(): + async def sample_start_experiment(): # Create a client - client = dialogflowcx_v3.ExperimentsClient() + client = dialogflowcx_v3.ExperimentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.StartExperimentRequest( @@ -751,7 +751,7 @@ def sample_start_experiment(): ) # Make the request - response = client.start_experiment(request=request) + response = await client.start_experiment(request=request) # Handle the response print(response) @@ -839,9 +839,9 @@ async def stop_experiment( from google.cloud import dialogflowcx_v3 - def sample_stop_experiment(): + async def sample_stop_experiment(): # Create a client - client = dialogflowcx_v3.ExperimentsClient() + client = dialogflowcx_v3.ExperimentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.StopExperimentRequest( @@ -849,7 +849,7 @@ def sample_stop_experiment(): ) # Make the request - response = client.stop_experiment(request=request) + response = await client.stop_experiment(request=request) # Handle the response print(response) diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/flows/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/flows/async_client.py index ce4ef1d5f661..6b9eba8985be 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/flows/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/flows/async_client.py @@ -235,9 +235,9 @@ async def create_flow( from google.cloud import dialogflowcx_v3 - def sample_create_flow(): + async def sample_create_flow(): # Create a client - client = dialogflowcx_v3.FlowsClient() + client = dialogflowcx_v3.FlowsAsyncClient() # Initialize request argument(s) flow = dialogflowcx_v3.Flow() @@ -249,7 +249,7 @@ def sample_create_flow(): ) # Make the request - response = client.create_flow(request=request) + response = await client.create_flow(request=request) # Handle the response print(response) @@ -362,9 +362,9 @@ async def delete_flow( from google.cloud import dialogflowcx_v3 - def sample_delete_flow(): + async def sample_delete_flow(): # Create a client - client = dialogflowcx_v3.FlowsClient() + client = dialogflowcx_v3.FlowsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.DeleteFlowRequest( @@ -372,7 +372,7 @@ def sample_delete_flow(): ) # Make the request - client.delete_flow(request=request) + await client.delete_flow(request=request) Args: request (Union[google.cloud.dialogflowcx_v3.types.DeleteFlowRequest, dict]): @@ -445,9 +445,9 @@ async def list_flows( from google.cloud import dialogflowcx_v3 - def sample_list_flows(): + async def sample_list_flows(): # Create a client - client = dialogflowcx_v3.FlowsClient() + client = dialogflowcx_v3.FlowsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.ListFlowsRequest( @@ -458,7 +458,7 @@ def sample_list_flows(): page_result = client.list_flows(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -553,9 +553,9 @@ async def get_flow( from google.cloud import dialogflowcx_v3 - def sample_get_flow(): + async def sample_get_flow(): # Create a client - client = dialogflowcx_v3.FlowsClient() + client = dialogflowcx_v3.FlowsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.GetFlowRequest( @@ -563,7 +563,7 @@ def sample_get_flow(): ) # Make the request - response = client.get_flow(request=request) + response = await client.get_flow(request=request) # Handle the response print(response) @@ -674,9 +674,9 @@ async def update_flow( from google.cloud import dialogflowcx_v3 - def sample_update_flow(): + async def sample_update_flow(): # Create a client - client = dialogflowcx_v3.FlowsClient() + client = dialogflowcx_v3.FlowsAsyncClient() # Initialize request argument(s) flow = dialogflowcx_v3.Flow() @@ -687,7 +687,7 @@ def sample_update_flow(): ) # Make the request - response = client.update_flow(request=request) + response = await client.update_flow(request=request) # Handle the response print(response) @@ -818,9 +818,9 @@ async def train_flow( from google.cloud import dialogflowcx_v3 - def sample_train_flow(): + async def sample_train_flow(): # Create a client - client = dialogflowcx_v3.FlowsClient() + client = dialogflowcx_v3.FlowsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.TrainFlowRequest( @@ -832,7 +832,7 @@ def sample_train_flow(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -940,9 +940,9 @@ async def validate_flow( from google.cloud import dialogflowcx_v3 - def sample_validate_flow(): + async def sample_validate_flow(): # Create a client - client = dialogflowcx_v3.FlowsClient() + client = dialogflowcx_v3.FlowsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.ValidateFlowRequest( @@ -950,7 +950,7 @@ def sample_validate_flow(): ) # Make the request - response = client.validate_flow(request=request) + response = await client.validate_flow(request=request) # Handle the response print(response) @@ -1015,9 +1015,9 @@ async def get_flow_validation_result( from google.cloud import dialogflowcx_v3 - def sample_get_flow_validation_result(): + async def sample_get_flow_validation_result(): # Create a client - client = dialogflowcx_v3.FlowsClient() + client = dialogflowcx_v3.FlowsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.GetFlowValidationResultRequest( @@ -1025,7 +1025,7 @@ def sample_get_flow_validation_result(): ) # Make the request - response = client.get_flow_validation_result(request=request) + response = await client.get_flow_validation_result(request=request) # Handle the response print(response) @@ -1124,9 +1124,9 @@ async def import_flow( from google.cloud import dialogflowcx_v3 - def sample_import_flow(): + async def sample_import_flow(): # Create a client - client = dialogflowcx_v3.FlowsClient() + client = dialogflowcx_v3.FlowsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.ImportFlowRequest( @@ -1139,7 +1139,7 @@ def sample_import_flow(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1227,9 +1227,9 @@ async def export_flow( from google.cloud import dialogflowcx_v3 - def sample_export_flow(): + async def sample_export_flow(): # Create a client - client = dialogflowcx_v3.FlowsClient() + client = dialogflowcx_v3.FlowsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.ExportFlowRequest( @@ -1241,7 +1241,7 @@ def sample_export_flow(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/intents/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/intents/async_client.py index 42a67aaf2ebb..faa5b83842b1 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/intents/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/intents/async_client.py @@ -216,9 +216,9 @@ async def list_intents( from google.cloud import dialogflowcx_v3 - def sample_list_intents(): + async def sample_list_intents(): # Create a client - client = dialogflowcx_v3.IntentsClient() + client = dialogflowcx_v3.IntentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.ListIntentsRequest( @@ -229,7 +229,7 @@ def sample_list_intents(): page_result = client.list_intents(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -324,9 +324,9 @@ async def get_intent( from google.cloud import dialogflowcx_v3 - def sample_get_intent(): + async def sample_get_intent(): # Create a client - client = dialogflowcx_v3.IntentsClient() + client = dialogflowcx_v3.IntentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.GetIntentRequest( @@ -334,7 +334,7 @@ def sample_get_intent(): ) # Make the request - response = client.get_intent(request=request) + response = await client.get_intent(request=request) # Handle the response print(response) @@ -429,9 +429,9 @@ async def create_intent( from google.cloud import dialogflowcx_v3 - def sample_create_intent(): + async def sample_create_intent(): # Create a client - client = dialogflowcx_v3.IntentsClient() + client = dialogflowcx_v3.IntentsAsyncClient() # Initialize request argument(s) intent = dialogflowcx_v3.Intent() @@ -443,7 +443,7 @@ def sample_create_intent(): ) # Make the request - response = client.create_intent(request=request) + response = await client.create_intent(request=request) # Handle the response print(response) @@ -545,9 +545,9 @@ async def update_intent( from google.cloud import dialogflowcx_v3 - def sample_update_intent(): + async def sample_update_intent(): # Create a client - client = dialogflowcx_v3.IntentsClient() + client = dialogflowcx_v3.IntentsAsyncClient() # Initialize request argument(s) intent = dialogflowcx_v3.Intent() @@ -558,7 +558,7 @@ def sample_update_intent(): ) # Make the request - response = client.update_intent(request=request) + response = await client.update_intent(request=request) # Handle the response print(response) @@ -662,9 +662,9 @@ async def delete_intent( from google.cloud import dialogflowcx_v3 - def sample_delete_intent(): + async def sample_delete_intent(): # Create a client - client = dialogflowcx_v3.IntentsClient() + client = dialogflowcx_v3.IntentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.DeleteIntentRequest( @@ -672,7 +672,7 @@ def sample_delete_intent(): ) # Make the request - client.delete_intent(request=request) + await client.delete_intent(request=request) Args: request (Union[google.cloud.dialogflowcx_v3.types.DeleteIntentRequest, dict]): diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/pages/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/pages/async_client.py index 4d2298762055..fbdc20ac39f3 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/pages/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/pages/async_client.py @@ -222,9 +222,9 @@ async def list_pages( from google.cloud import dialogflowcx_v3 - def sample_list_pages(): + async def sample_list_pages(): # Create a client - client = dialogflowcx_v3.PagesClient() + client = dialogflowcx_v3.PagesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.ListPagesRequest( @@ -235,7 +235,7 @@ def sample_list_pages(): page_result = client.list_pages(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -330,9 +330,9 @@ async def get_page( from google.cloud import dialogflowcx_v3 - def sample_get_page(): + async def sample_get_page(): # Create a client - client = dialogflowcx_v3.PagesClient() + client = dialogflowcx_v3.PagesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.GetPageRequest( @@ -340,7 +340,7 @@ def sample_get_page(): ) # Make the request - response = client.get_page(request=request) + response = await client.get_page(request=request) # Handle the response print(response) @@ -450,9 +450,9 @@ async def create_page( from google.cloud import dialogflowcx_v3 - def sample_create_page(): + async def sample_create_page(): # Create a client - client = dialogflowcx_v3.PagesClient() + client = dialogflowcx_v3.PagesAsyncClient() # Initialize request argument(s) page = dialogflowcx_v3.Page() @@ -464,7 +464,7 @@ def sample_create_page(): ) # Make the request - response = client.create_page(request=request) + response = await client.create_page(request=request) # Handle the response print(response) @@ -581,9 +581,9 @@ async def update_page( from google.cloud import dialogflowcx_v3 - def sample_update_page(): + async def sample_update_page(): # Create a client - client = dialogflowcx_v3.PagesClient() + client = dialogflowcx_v3.PagesAsyncClient() # Initialize request argument(s) page = dialogflowcx_v3.Page() @@ -594,7 +594,7 @@ def sample_update_page(): ) # Make the request - response = client.update_page(request=request) + response = await client.update_page(request=request) # Handle the response print(response) @@ -713,9 +713,9 @@ async def delete_page( from google.cloud import dialogflowcx_v3 - def sample_delete_page(): + async def sample_delete_page(): # Create a client - client = dialogflowcx_v3.PagesClient() + client = dialogflowcx_v3.PagesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.DeletePageRequest( @@ -723,7 +723,7 @@ def sample_delete_page(): ) # Make the request - client.delete_page(request=request) + await client.delete_page(request=request) Args: request (Union[google.cloud.dialogflowcx_v3.types.DeletePageRequest, dict]): diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/security_settings_service/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/security_settings_service/async_client.py index 186c5f30845a..54a0f6e600be 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/security_settings_service/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/security_settings_service/async_client.py @@ -245,9 +245,9 @@ async def create_security_settings( from google.cloud import dialogflowcx_v3 - def sample_create_security_settings(): + async def sample_create_security_settings(): # Create a client - client = dialogflowcx_v3.SecuritySettingsServiceClient() + client = dialogflowcx_v3.SecuritySettingsServiceAsyncClient() # Initialize request argument(s) security_settings = dialogflowcx_v3.SecuritySettings() @@ -260,7 +260,7 @@ def sample_create_security_settings(): ) # Make the request - response = client.create_security_settings(request=request) + response = await client.create_security_settings(request=request) # Handle the response print(response) @@ -362,9 +362,9 @@ async def get_security_settings( from google.cloud import dialogflowcx_v3 - def sample_get_security_settings(): + async def sample_get_security_settings(): # Create a client - client = dialogflowcx_v3.SecuritySettingsServiceClient() + client = dialogflowcx_v3.SecuritySettingsServiceAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.GetSecuritySettingsRequest( @@ -372,7 +372,7 @@ def sample_get_security_settings(): ) # Make the request - response = client.get_security_settings(request=request) + response = await client.get_security_settings(request=request) # Handle the response print(response) @@ -465,9 +465,9 @@ async def update_security_settings( from google.cloud import dialogflowcx_v3 - def sample_update_security_settings(): + async def sample_update_security_settings(): # Create a client - client = dialogflowcx_v3.SecuritySettingsServiceClient() + client = dialogflowcx_v3.SecuritySettingsServiceAsyncClient() # Initialize request argument(s) security_settings = dialogflowcx_v3.SecuritySettings() @@ -479,7 +479,7 @@ def sample_update_security_settings(): ) # Make the request - response = client.update_security_settings(request=request) + response = await client.update_security_settings(request=request) # Handle the response print(response) @@ -581,9 +581,9 @@ async def list_security_settings( from google.cloud import dialogflowcx_v3 - def sample_list_security_settings(): + async def sample_list_security_settings(): # Create a client - client = dialogflowcx_v3.SecuritySettingsServiceClient() + client = dialogflowcx_v3.SecuritySettingsServiceAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.ListSecuritySettingsRequest( @@ -594,7 +594,7 @@ def sample_list_security_settings(): page_result = client.list_security_settings(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -691,9 +691,9 @@ async def delete_security_settings( from google.cloud import dialogflowcx_v3 - def sample_delete_security_settings(): + async def sample_delete_security_settings(): # Create a client - client = dialogflowcx_v3.SecuritySettingsServiceClient() + client = dialogflowcx_v3.SecuritySettingsServiceAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.DeleteSecuritySettingsRequest( @@ -701,7 +701,7 @@ def sample_delete_security_settings(): ) # Make the request - client.delete_security_settings(request=request) + await client.delete_security_settings(request=request) Args: request (Union[google.cloud.dialogflowcx_v3.types.DeleteSecuritySettingsRequest, dict]): diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/session_entity_types/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/session_entity_types/async_client.py index 045eee57ef91..e903bfaba3e2 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/session_entity_types/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/session_entity_types/async_client.py @@ -230,9 +230,9 @@ async def list_session_entity_types( from google.cloud import dialogflowcx_v3 - def sample_list_session_entity_types(): + async def sample_list_session_entity_types(): # Create a client - client = dialogflowcx_v3.SessionEntityTypesClient() + client = dialogflowcx_v3.SessionEntityTypesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.ListSessionEntityTypesRequest( @@ -243,7 +243,7 @@ def sample_list_session_entity_types(): page_result = client.list_session_entity_types(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -343,9 +343,9 @@ async def get_session_entity_type( from google.cloud import dialogflowcx_v3 - def sample_get_session_entity_type(): + async def sample_get_session_entity_type(): # Create a client - client = dialogflowcx_v3.SessionEntityTypesClient() + client = dialogflowcx_v3.SessionEntityTypesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.GetSessionEntityTypeRequest( @@ -353,7 +353,7 @@ def sample_get_session_entity_type(): ) # Make the request - response = client.get_session_entity_type(request=request) + response = await client.get_session_entity_type(request=request) # Handle the response print(response) @@ -459,9 +459,9 @@ async def create_session_entity_type( from google.cloud import dialogflowcx_v3 - def sample_create_session_entity_type(): + async def sample_create_session_entity_type(): # Create a client - client = dialogflowcx_v3.SessionEntityTypesClient() + client = dialogflowcx_v3.SessionEntityTypesAsyncClient() # Initialize request argument(s) session_entity_type = dialogflowcx_v3.SessionEntityType() @@ -476,7 +476,7 @@ def sample_create_session_entity_type(): ) # Make the request - response = client.create_session_entity_type(request=request) + response = await client.create_session_entity_type(request=request) # Handle the response print(response) @@ -592,9 +592,9 @@ async def update_session_entity_type( from google.cloud import dialogflowcx_v3 - def sample_update_session_entity_type(): + async def sample_update_session_entity_type(): # Create a client - client = dialogflowcx_v3.SessionEntityTypesClient() + client = dialogflowcx_v3.SessionEntityTypesAsyncClient() # Initialize request argument(s) session_entity_type = dialogflowcx_v3.SessionEntityType() @@ -608,7 +608,7 @@ def sample_update_session_entity_type(): ) # Make the request - response = client.update_session_entity_type(request=request) + response = await client.update_session_entity_type(request=request) # Handle the response print(response) @@ -722,9 +722,9 @@ async def delete_session_entity_type( from google.cloud import dialogflowcx_v3 - def sample_delete_session_entity_type(): + async def sample_delete_session_entity_type(): # Create a client - client = dialogflowcx_v3.SessionEntityTypesClient() + client = dialogflowcx_v3.SessionEntityTypesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.DeleteSessionEntityTypeRequest( @@ -732,7 +732,7 @@ def sample_delete_session_entity_type(): ) # Make the request - client.delete_session_entity_type(request=request) + await client.delete_session_entity_type(request=request) Args: request (Union[google.cloud.dialogflowcx_v3.types.DeleteSessionEntityTypeRequest, dict]): diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/sessions/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/sessions/async_client.py index b8aa2c2e6353..d778a9556355 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/sessions/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/sessions/async_client.py @@ -253,9 +253,9 @@ async def detect_intent( from google.cloud import dialogflowcx_v3 - def sample_detect_intent(): + async def sample_detect_intent(): # Create a client - client = dialogflowcx_v3.SessionsClient() + client = dialogflowcx_v3.SessionsAsyncClient() # Initialize request argument(s) query_input = dialogflowcx_v3.QueryInput() @@ -268,7 +268,7 @@ def sample_detect_intent(): ) # Make the request - response = client.detect_intent(request=request) + response = await client.detect_intent(request=request) # Handle the response print(response) @@ -346,9 +346,9 @@ def streaming_detect_intent( from google.cloud import dialogflowcx_v3 - def sample_streaming_detect_intent(): + async def sample_streaming_detect_intent(): # Create a client - client = dialogflowcx_v3.SessionsClient() + client = dialogflowcx_v3.SessionsAsyncClient() # Initialize request argument(s) query_input = dialogflowcx_v3.QueryInput() @@ -370,10 +370,10 @@ def request_generator(): yield request # Make the request - stream = client.streaming_detect_intent(requests=request_generator()) + stream = await client.streaming_detect_intent(requests=request_generator()) # Handle the response - for response in stream: + async for response in stream: print(response) Args: @@ -489,9 +489,9 @@ async def match_intent( from google.cloud import dialogflowcx_v3 - def sample_match_intent(): + async def sample_match_intent(): # Create a client - client = dialogflowcx_v3.SessionsClient() + client = dialogflowcx_v3.SessionsAsyncClient() # Initialize request argument(s) query_input = dialogflowcx_v3.QueryInput() @@ -504,7 +504,7 @@ def sample_match_intent(): ) # Make the request - response = client.match_intent(request=request) + response = await client.match_intent(request=request) # Handle the response print(response) @@ -570,16 +570,16 @@ async def fulfill_intent( from google.cloud import dialogflowcx_v3 - def sample_fulfill_intent(): + async def sample_fulfill_intent(): # Create a client - client = dialogflowcx_v3.SessionsClient() + client = dialogflowcx_v3.SessionsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.FulfillIntentRequest( ) # Make the request - response = client.fulfill_intent(request=request) + response = await client.fulfill_intent(request=request) # Handle the response print(response) diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/test_cases/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/test_cases/async_client.py index 3ecc8605e111..a8e7fc992864 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/test_cases/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/test_cases/async_client.py @@ -243,9 +243,9 @@ async def list_test_cases( from google.cloud import dialogflowcx_v3 - def sample_list_test_cases(): + async def sample_list_test_cases(): # Create a client - client = dialogflowcx_v3.TestCasesClient() + client = dialogflowcx_v3.TestCasesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.ListTestCasesRequest( @@ -256,7 +256,7 @@ def sample_list_test_cases(): page_result = client.list_test_cases(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -351,9 +351,9 @@ async def batch_delete_test_cases( from google.cloud import dialogflowcx_v3 - def sample_batch_delete_test_cases(): + async def sample_batch_delete_test_cases(): # Create a client - client = dialogflowcx_v3.TestCasesClient() + client = dialogflowcx_v3.TestCasesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.BatchDeleteTestCasesRequest( @@ -362,7 +362,7 @@ def sample_batch_delete_test_cases(): ) # Make the request - client.batch_delete_test_cases(request=request) + await client.batch_delete_test_cases(request=request) Args: request (Union[google.cloud.dialogflowcx_v3.types.BatchDeleteTestCasesRequest, dict]): @@ -435,9 +435,9 @@ async def get_test_case( from google.cloud import dialogflowcx_v3 - def sample_get_test_case(): + async def sample_get_test_case(): # Create a client - client = dialogflowcx_v3.TestCasesClient() + client = dialogflowcx_v3.TestCasesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.GetTestCaseRequest( @@ -445,7 +445,7 @@ def sample_get_test_case(): ) # Make the request - response = client.get_test_case(request=request) + response = await client.get_test_case(request=request) # Handle the response print(response) @@ -529,9 +529,9 @@ async def create_test_case( from google.cloud import dialogflowcx_v3 - def sample_create_test_case(): + async def sample_create_test_case(): # Create a client - client = dialogflowcx_v3.TestCasesClient() + client = dialogflowcx_v3.TestCasesAsyncClient() # Initialize request argument(s) test_case = dialogflowcx_v3.TestCase() @@ -543,7 +543,7 @@ def sample_create_test_case(): ) # Make the request - response = client.create_test_case(request=request) + response = await client.create_test_case(request=request) # Handle the response print(response) @@ -634,9 +634,9 @@ async def update_test_case( from google.cloud import dialogflowcx_v3 - def sample_update_test_case(): + async def sample_update_test_case(): # Create a client - client = dialogflowcx_v3.TestCasesClient() + client = dialogflowcx_v3.TestCasesAsyncClient() # Initialize request argument(s) test_case = dialogflowcx_v3.TestCase() @@ -647,7 +647,7 @@ def sample_update_test_case(): ) # Make the request - response = client.update_test_case(request=request) + response = await client.update_test_case(request=request) # Handle the response print(response) @@ -752,9 +752,9 @@ async def run_test_case( from google.cloud import dialogflowcx_v3 - def sample_run_test_case(): + async def sample_run_test_case(): # Create a client - client = dialogflowcx_v3.TestCasesClient() + client = dialogflowcx_v3.TestCasesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.RunTestCaseRequest( @@ -766,7 +766,7 @@ def sample_run_test_case(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -851,9 +851,9 @@ async def batch_run_test_cases( from google.cloud import dialogflowcx_v3 - def sample_batch_run_test_cases(): + async def sample_batch_run_test_cases(): # Create a client - client = dialogflowcx_v3.TestCasesClient() + client = dialogflowcx_v3.TestCasesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.BatchRunTestCasesRequest( @@ -866,7 +866,7 @@ def sample_batch_run_test_cases(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -941,9 +941,9 @@ async def calculate_coverage( from google.cloud import dialogflowcx_v3 - def sample_calculate_coverage(): + async def sample_calculate_coverage(): # Create a client - client = dialogflowcx_v3.TestCasesClient() + client = dialogflowcx_v3.TestCasesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.CalculateCoverageRequest( @@ -952,7 +952,7 @@ def sample_calculate_coverage(): ) # Make the request - response = client.calculate_coverage(request=request) + response = await client.calculate_coverage(request=request) # Handle the response print(response) @@ -1028,9 +1028,9 @@ async def import_test_cases( from google.cloud import dialogflowcx_v3 - def sample_import_test_cases(): + async def sample_import_test_cases(): # Create a client - client = dialogflowcx_v3.TestCasesClient() + client = dialogflowcx_v3.TestCasesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.ImportTestCasesRequest( @@ -1043,7 +1043,7 @@ def sample_import_test_cases(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1130,9 +1130,9 @@ async def export_test_cases( from google.cloud import dialogflowcx_v3 - def sample_export_test_cases(): + async def sample_export_test_cases(): # Create a client - client = dialogflowcx_v3.TestCasesClient() + client = dialogflowcx_v3.TestCasesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.ExportTestCasesRequest( @@ -1145,7 +1145,7 @@ def sample_export_test_cases(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1221,9 +1221,9 @@ async def list_test_case_results( from google.cloud import dialogflowcx_v3 - def sample_list_test_case_results(): + async def sample_list_test_case_results(): # Create a client - client = dialogflowcx_v3.TestCasesClient() + client = dialogflowcx_v3.TestCasesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.ListTestCaseResultsRequest( @@ -1234,7 +1234,7 @@ def sample_list_test_case_results(): page_result = client.list_test_case_results(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -1331,9 +1331,9 @@ async def get_test_case_result( from google.cloud import dialogflowcx_v3 - def sample_get_test_case_result(): + async def sample_get_test_case_result(): # Create a client - client = dialogflowcx_v3.TestCasesClient() + client = dialogflowcx_v3.TestCasesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.GetTestCaseResultRequest( @@ -1341,7 +1341,7 @@ def sample_get_test_case_result(): ) # Make the request - response = client.get_test_case_result(request=request) + response = await client.get_test_case_result(request=request) # Handle the response print(response) diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/transition_route_groups/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/transition_route_groups/async_client.py index 2ee4d88f1c15..c2c5df1562bb 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/transition_route_groups/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/transition_route_groups/async_client.py @@ -242,9 +242,9 @@ async def list_transition_route_groups( from google.cloud import dialogflowcx_v3 - def sample_list_transition_route_groups(): + async def sample_list_transition_route_groups(): # Create a client - client = dialogflowcx_v3.TransitionRouteGroupsClient() + client = dialogflowcx_v3.TransitionRouteGroupsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.ListTransitionRouteGroupsRequest( @@ -255,7 +255,7 @@ def sample_list_transition_route_groups(): page_result = client.list_transition_route_groups(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -354,9 +354,9 @@ async def get_transition_route_group( from google.cloud import dialogflowcx_v3 - def sample_get_transition_route_group(): + async def sample_get_transition_route_group(): # Create a client - client = dialogflowcx_v3.TransitionRouteGroupsClient() + client = dialogflowcx_v3.TransitionRouteGroupsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.GetTransitionRouteGroupRequest( @@ -364,7 +364,7 @@ def sample_get_transition_route_group(): ) # Make the request - response = client.get_transition_route_group(request=request) + response = await client.get_transition_route_group(request=request) # Handle the response print(response) @@ -462,9 +462,9 @@ async def create_transition_route_group( from google.cloud import dialogflowcx_v3 - def sample_create_transition_route_group(): + async def sample_create_transition_route_group(): # Create a client - client = dialogflowcx_v3.TransitionRouteGroupsClient() + client = dialogflowcx_v3.TransitionRouteGroupsAsyncClient() # Initialize request argument(s) transition_route_group = dialogflowcx_v3.TransitionRouteGroup() @@ -476,7 +476,7 @@ def sample_create_transition_route_group(): ) # Make the request - response = client.create_transition_route_group(request=request) + response = await client.create_transition_route_group(request=request) # Handle the response print(response) @@ -582,9 +582,9 @@ async def update_transition_route_group( from google.cloud import dialogflowcx_v3 - def sample_update_transition_route_group(): + async def sample_update_transition_route_group(): # Create a client - client = dialogflowcx_v3.TransitionRouteGroupsClient() + client = dialogflowcx_v3.TransitionRouteGroupsAsyncClient() # Initialize request argument(s) transition_route_group = dialogflowcx_v3.TransitionRouteGroup() @@ -595,7 +595,7 @@ def sample_update_transition_route_group(): ) # Make the request - response = client.update_transition_route_group(request=request) + response = await client.update_transition_route_group(request=request) # Handle the response print(response) @@ -700,9 +700,9 @@ async def delete_transition_route_group( from google.cloud import dialogflowcx_v3 - def sample_delete_transition_route_group(): + async def sample_delete_transition_route_group(): # Create a client - client = dialogflowcx_v3.TransitionRouteGroupsClient() + client = dialogflowcx_v3.TransitionRouteGroupsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.DeleteTransitionRouteGroupRequest( @@ -710,7 +710,7 @@ def sample_delete_transition_route_group(): ) # Make the request - client.delete_transition_route_group(request=request) + await client.delete_transition_route_group(request=request) Args: request (Union[google.cloud.dialogflowcx_v3.types.DeleteTransitionRouteGroupRequest, dict]): diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/versions/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/versions/async_client.py index 7a7f2f467c2a..bfa3c226ba1c 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/versions/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/versions/async_client.py @@ -220,9 +220,9 @@ async def list_versions( from google.cloud import dialogflowcx_v3 - def sample_list_versions(): + async def sample_list_versions(): # Create a client - client = dialogflowcx_v3.VersionsClient() + client = dialogflowcx_v3.VersionsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.ListVersionsRequest( @@ -233,7 +233,7 @@ def sample_list_versions(): page_result = client.list_versions(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -330,9 +330,9 @@ async def get_version( from google.cloud import dialogflowcx_v3 - def sample_get_version(): + async def sample_get_version(): # Create a client - client = dialogflowcx_v3.VersionsClient() + client = dialogflowcx_v3.VersionsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.GetVersionRequest( @@ -340,7 +340,7 @@ def sample_get_version(): ) # Make the request - response = client.get_version(request=request) + response = await client.get_version(request=request) # Handle the response print(response) @@ -437,9 +437,9 @@ async def create_version( from google.cloud import dialogflowcx_v3 - def sample_create_version(): + async def sample_create_version(): # Create a client - client = dialogflowcx_v3.VersionsClient() + client = dialogflowcx_v3.VersionsAsyncClient() # Initialize request argument(s) version = dialogflowcx_v3.Version() @@ -455,7 +455,7 @@ def sample_create_version(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -563,9 +563,9 @@ async def update_version( from google.cloud import dialogflowcx_v3 - def sample_update_version(): + async def sample_update_version(): # Create a client - client = dialogflowcx_v3.VersionsClient() + client = dialogflowcx_v3.VersionsAsyncClient() # Initialize request argument(s) version = dialogflowcx_v3.Version() @@ -576,7 +576,7 @@ def sample_update_version(): ) # Make the request - response = client.update_version(request=request) + response = await client.update_version(request=request) # Handle the response print(response) @@ -670,9 +670,9 @@ async def delete_version( from google.cloud import dialogflowcx_v3 - def sample_delete_version(): + async def sample_delete_version(): # Create a client - client = dialogflowcx_v3.VersionsClient() + client = dialogflowcx_v3.VersionsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.DeleteVersionRequest( @@ -680,7 +680,7 @@ def sample_delete_version(): ) # Make the request - client.delete_version(request=request) + await client.delete_version(request=request) Args: request (Union[google.cloud.dialogflowcx_v3.types.DeleteVersionRequest, dict]): @@ -765,9 +765,9 @@ async def load_version( from google.cloud import dialogflowcx_v3 - def sample_load_version(): + async def sample_load_version(): # Create a client - client = dialogflowcx_v3.VersionsClient() + client = dialogflowcx_v3.VersionsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.LoadVersionRequest( @@ -779,7 +779,7 @@ def sample_load_version(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -888,9 +888,9 @@ async def compare_versions( from google.cloud import dialogflowcx_v3 - def sample_compare_versions(): + async def sample_compare_versions(): # Create a client - client = dialogflowcx_v3.VersionsClient() + client = dialogflowcx_v3.VersionsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.CompareVersionsRequest( @@ -899,7 +899,7 @@ def sample_compare_versions(): ) # Make the request - response = client.compare_versions(request=request) + response = await client.compare_versions(request=request) # Handle the response print(response) diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/webhooks/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/webhooks/async_client.py index 95780ee96281..10c5d5a4d6af 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/webhooks/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/webhooks/async_client.py @@ -217,9 +217,9 @@ async def list_webhooks( from google.cloud import dialogflowcx_v3 - def sample_list_webhooks(): + async def sample_list_webhooks(): # Create a client - client = dialogflowcx_v3.WebhooksClient() + client = dialogflowcx_v3.WebhooksAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.ListWebhooksRequest( @@ -230,7 +230,7 @@ def sample_list_webhooks(): page_result = client.list_webhooks(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -325,9 +325,9 @@ async def get_webhook( from google.cloud import dialogflowcx_v3 - def sample_get_webhook(): + async def sample_get_webhook(): # Create a client - client = dialogflowcx_v3.WebhooksClient() + client = dialogflowcx_v3.WebhooksAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.GetWebhookRequest( @@ -335,7 +335,7 @@ def sample_get_webhook(): ) # Make the request - response = client.get_webhook(request=request) + response = await client.get_webhook(request=request) # Handle the response print(response) @@ -426,9 +426,9 @@ async def create_webhook( from google.cloud import dialogflowcx_v3 - def sample_create_webhook(): + async def sample_create_webhook(): # Create a client - client = dialogflowcx_v3.WebhooksClient() + client = dialogflowcx_v3.WebhooksAsyncClient() # Initialize request argument(s) webhook = dialogflowcx_v3.Webhook() @@ -441,7 +441,7 @@ def sample_create_webhook(): ) # Make the request - response = client.create_webhook(request=request) + response = await client.create_webhook(request=request) # Handle the response print(response) @@ -539,9 +539,9 @@ async def update_webhook( from google.cloud import dialogflowcx_v3 - def sample_update_webhook(): + async def sample_update_webhook(): # Create a client - client = dialogflowcx_v3.WebhooksClient() + client = dialogflowcx_v3.WebhooksAsyncClient() # Initialize request argument(s) webhook = dialogflowcx_v3.Webhook() @@ -553,7 +553,7 @@ def sample_update_webhook(): ) # Make the request - response = client.update_webhook(request=request) + response = await client.update_webhook(request=request) # Handle the response print(response) @@ -653,9 +653,9 @@ async def delete_webhook( from google.cloud import dialogflowcx_v3 - def sample_delete_webhook(): + async def sample_delete_webhook(): # Create a client - client = dialogflowcx_v3.WebhooksClient() + client = dialogflowcx_v3.WebhooksAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3.DeleteWebhookRequest( @@ -663,7 +663,7 @@ def sample_delete_webhook(): ) # Make the request - client.delete_webhook(request=request) + await client.delete_webhook(request=request) Args: request (Union[google.cloud.dialogflowcx_v3.types.DeleteWebhookRequest, dict]): diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/security_settings.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/security_settings.py index eb73898271ea..42ad6713ffd5 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/security_settings.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/security_settings.py @@ -255,6 +255,27 @@ class SecuritySettings(proto.Message): purge_data_types (Sequence[google.cloud.dialogflowcx_v3.types.SecuritySettings.PurgeDataType]): List of types of data to remove when retention settings triggers purge. + audio_export_settings (google.cloud.dialogflowcx_v3.types.SecuritySettings.AudioExportSettings): + Controls audio export settings for post-conversation + analytics when ingesting audio to conversations via + [Participants.AnalyzeContent][] or + [Participants.StreamingAnalyzeContent][]. + + If + [retention_strategy][google.cloud.dialogflow.cx.v3.SecuritySettings.retention_strategy] + is set to REMOVE_AFTER_CONVERSATION or + [audio_export_settings.gcs_bucket][] is empty, audio export + is disabled. + + If audio export is enabled, audio is recorded and saved to + [audio_export_settings.gcs_bucket][], subject to retention + policy of [audio_export_settings.gcs_bucket][]. + + This setting won't effect audio input for implicit sessions + via + [Sessions.DetectIntent][google.cloud.dialogflow.cx.v3.Sessions.DetectIntent] + or + [Sessions.StreamingDetectIntent][google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntent]. insights_export_settings (google.cloud.dialogflowcx_v3.types.SecuritySettings.InsightsExportSettings): Controls conversation exporting settings to Insights after conversation is completed. @@ -282,6 +303,51 @@ class PurgeDataType(proto.Enum): PURGE_DATA_TYPE_UNSPECIFIED = 0 DIALOGFLOW_HISTORY = 1 + class AudioExportSettings(proto.Message): + r"""Settings for exporting audio. + + Attributes: + gcs_bucket (str): + Cloud Storage bucket to export audio record to. You need to + grant + ``service-@gcp-sa-dialogflow.iam.gserviceaccount.com`` + the ``Storage Object Admin`` role in this bucket. + audio_export_pattern (str): + Filename pattern for exported audio. + enable_audio_redaction (bool): + Enable audio redaction if it is true. + audio_format (google.cloud.dialogflowcx_v3.types.SecuritySettings.AudioExportSettings.AudioFormat): + File format for exported audio file. + Currently only in telephony recordings. + """ + + class AudioFormat(proto.Enum): + r"""File format for exported audio file. Currently only in + telephony recordings. + """ + AUDIO_FORMAT_UNSPECIFIED = 0 + MULAW = 1 + MP3 = 2 + OGG = 3 + + gcs_bucket = proto.Field( + proto.STRING, + number=1, + ) + audio_export_pattern = proto.Field( + proto.STRING, + number=2, + ) + enable_audio_redaction = proto.Field( + proto.BOOL, + number=3, + ) + audio_format = proto.Field( + proto.ENUM, + number=4, + enum="SecuritySettings.AudioExportSettings.AudioFormat", + ) + class InsightsExportSettings(proto.Message): r"""Settings for exporting conversations to `Insights `__. @@ -334,6 +400,11 @@ class InsightsExportSettings(proto.Message): number=8, enum=PurgeDataType, ) + audio_export_settings = proto.Field( + proto.MESSAGE, + number=12, + message=AudioExportSettings, + ) insights_export_settings = proto.Field( proto.MESSAGE, number=13, diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/agents/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/agents/async_client.py index 18fa36e7f991..56392849e1d2 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/agents/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/agents/async_client.py @@ -236,9 +236,9 @@ async def list_agents( from google.cloud import dialogflowcx_v3beta1 - def sample_list_agents(): + async def sample_list_agents(): # Create a client - client = dialogflowcx_v3beta1.AgentsClient() + client = dialogflowcx_v3beta1.AgentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ListAgentsRequest( @@ -249,7 +249,7 @@ def sample_list_agents(): page_result = client.list_agents(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -344,9 +344,9 @@ async def get_agent( from google.cloud import dialogflowcx_v3beta1 - def sample_get_agent(): + async def sample_get_agent(): # Create a client - client = dialogflowcx_v3beta1.AgentsClient() + client = dialogflowcx_v3beta1.AgentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.GetAgentRequest( @@ -354,7 +354,7 @@ def sample_get_agent(): ) # Make the request - response = client.get_agent(request=request) + response = await client.get_agent(request=request) # Handle the response print(response) @@ -456,9 +456,9 @@ async def create_agent( from google.cloud import dialogflowcx_v3beta1 - def sample_create_agent(): + async def sample_create_agent(): # Create a client - client = dialogflowcx_v3beta1.AgentsClient() + client = dialogflowcx_v3beta1.AgentsAsyncClient() # Initialize request argument(s) agent = dialogflowcx_v3beta1.Agent() @@ -472,7 +472,7 @@ def sample_create_agent(): ) # Make the request - response = client.create_agent(request=request) + response = await client.create_agent(request=request) # Handle the response print(response) @@ -581,9 +581,9 @@ async def update_agent( from google.cloud import dialogflowcx_v3beta1 - def sample_update_agent(): + async def sample_update_agent(): # Create a client - client = dialogflowcx_v3beta1.AgentsClient() + client = dialogflowcx_v3beta1.AgentsAsyncClient() # Initialize request argument(s) agent = dialogflowcx_v3beta1.Agent() @@ -596,7 +596,7 @@ def sample_update_agent(): ) # Make the request - response = client.update_agent(request=request) + response = await client.update_agent(request=request) # Handle the response print(response) @@ -703,9 +703,9 @@ async def delete_agent( from google.cloud import dialogflowcx_v3beta1 - def sample_delete_agent(): + async def sample_delete_agent(): # Create a client - client = dialogflowcx_v3beta1.AgentsClient() + client = dialogflowcx_v3beta1.AgentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.DeleteAgentRequest( @@ -713,7 +713,7 @@ def sample_delete_agent(): ) # Make the request - client.delete_agent(request=request) + await client.delete_agent(request=request) Args: request (Union[google.cloud.dialogflowcx_v3beta1.types.DeleteAgentRequest, dict]): @@ -795,9 +795,9 @@ async def export_agent( from google.cloud import dialogflowcx_v3beta1 - def sample_export_agent(): + async def sample_export_agent(): # Create a client - client = dialogflowcx_v3beta1.AgentsClient() + client = dialogflowcx_v3beta1.AgentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ExportAgentRequest( @@ -809,7 +809,7 @@ def sample_export_agent(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -902,9 +902,9 @@ async def restore_agent( from google.cloud import dialogflowcx_v3beta1 - def sample_restore_agent(): + async def sample_restore_agent(): # Create a client - client = dialogflowcx_v3beta1.AgentsClient() + client = dialogflowcx_v3beta1.AgentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.RestoreAgentRequest( @@ -917,7 +917,7 @@ def sample_restore_agent(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1004,9 +1004,9 @@ async def validate_agent( from google.cloud import dialogflowcx_v3beta1 - def sample_validate_agent(): + async def sample_validate_agent(): # Create a client - client = dialogflowcx_v3beta1.AgentsClient() + client = dialogflowcx_v3beta1.AgentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ValidateAgentRequest( @@ -1014,7 +1014,7 @@ def sample_validate_agent(): ) # Make the request - response = client.validate_agent(request=request) + response = await client.validate_agent(request=request) # Handle the response print(response) @@ -1079,9 +1079,9 @@ async def get_agent_validation_result( from google.cloud import dialogflowcx_v3beta1 - def sample_get_agent_validation_result(): + async def sample_get_agent_validation_result(): # Create a client - client = dialogflowcx_v3beta1.AgentsClient() + client = dialogflowcx_v3beta1.AgentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.GetAgentValidationResultRequest( @@ -1089,7 +1089,7 @@ def sample_get_agent_validation_result(): ) # Make the request - response = client.get_agent_validation_result(request=request) + response = await client.get_agent_validation_result(request=request) # Handle the response print(response) diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/changelogs/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/changelogs/async_client.py index d0cc9c3dbffd..49e324dec2ba 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/changelogs/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/changelogs/async_client.py @@ -214,9 +214,9 @@ async def list_changelogs( from google.cloud import dialogflowcx_v3beta1 - def sample_list_changelogs(): + async def sample_list_changelogs(): # Create a client - client = dialogflowcx_v3beta1.ChangelogsClient() + client = dialogflowcx_v3beta1.ChangelogsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ListChangelogsRequest( @@ -227,7 +227,7 @@ def sample_list_changelogs(): page_result = client.list_changelogs(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -322,9 +322,9 @@ async def get_changelog( from google.cloud import dialogflowcx_v3beta1 - def sample_get_changelog(): + async def sample_get_changelog(): # Create a client - client = dialogflowcx_v3beta1.ChangelogsClient() + client = dialogflowcx_v3beta1.ChangelogsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.GetChangelogRequest( @@ -332,7 +332,7 @@ def sample_get_changelog(): ) # Make the request - response = client.get_changelog(request=request) + response = await client.get_changelog(request=request) # Handle the response print(response) diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/deployments/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/deployments/async_client.py index dc4a82052b84..00a07c15e79f 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/deployments/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/deployments/async_client.py @@ -225,9 +225,9 @@ async def list_deployments( from google.cloud import dialogflowcx_v3beta1 - def sample_list_deployments(): + async def sample_list_deployments(): # Create a client - client = dialogflowcx_v3beta1.DeploymentsClient() + client = dialogflowcx_v3beta1.DeploymentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ListDeploymentsRequest( @@ -238,7 +238,7 @@ def sample_list_deployments(): page_result = client.list_deployments(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -336,9 +336,9 @@ async def get_deployment( from google.cloud import dialogflowcx_v3beta1 - def sample_get_deployment(): + async def sample_get_deployment(): # Create a client - client = dialogflowcx_v3beta1.DeploymentsClient() + client = dialogflowcx_v3beta1.DeploymentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.GetDeploymentRequest( @@ -346,7 +346,7 @@ def sample_get_deployment(): ) # Make the request - response = client.get_deployment(request=request) + response = await client.get_deployment(request=request) # Handle the response print(response) diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/entity_types/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/entity_types/async_client.py index 720d975060fd..e221dab01606 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/entity_types/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/entity_types/async_client.py @@ -218,9 +218,9 @@ async def list_entity_types( from google.cloud import dialogflowcx_v3beta1 - def sample_list_entity_types(): + async def sample_list_entity_types(): # Create a client - client = dialogflowcx_v3beta1.EntityTypesClient() + client = dialogflowcx_v3beta1.EntityTypesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ListEntityTypesRequest( @@ -231,7 +231,7 @@ def sample_list_entity_types(): page_result = client.list_entity_types(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -327,9 +327,9 @@ async def get_entity_type( from google.cloud import dialogflowcx_v3beta1 - def sample_get_entity_type(): + async def sample_get_entity_type(): # Create a client - client = dialogflowcx_v3beta1.EntityTypesClient() + client = dialogflowcx_v3beta1.EntityTypesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.GetEntityTypeRequest( @@ -337,7 +337,7 @@ def sample_get_entity_type(): ) # Make the request - response = client.get_entity_type(request=request) + response = await client.get_entity_type(request=request) # Handle the response print(response) @@ -455,9 +455,9 @@ async def create_entity_type( from google.cloud import dialogflowcx_v3beta1 - def sample_create_entity_type(): + async def sample_create_entity_type(): # Create a client - client = dialogflowcx_v3beta1.EntityTypesClient() + client = dialogflowcx_v3beta1.EntityTypesAsyncClient() # Initialize request argument(s) entity_type = dialogflowcx_v3beta1.EntityType() @@ -470,7 +470,7 @@ def sample_create_entity_type(): ) # Make the request - response = client.create_entity_type(request=request) + response = await client.create_entity_type(request=request) # Handle the response print(response) @@ -599,9 +599,9 @@ async def update_entity_type( from google.cloud import dialogflowcx_v3beta1 - def sample_update_entity_type(): + async def sample_update_entity_type(): # Create a client - client = dialogflowcx_v3beta1.EntityTypesClient() + client = dialogflowcx_v3beta1.EntityTypesAsyncClient() # Initialize request argument(s) entity_type = dialogflowcx_v3beta1.EntityType() @@ -613,7 +613,7 @@ def sample_update_entity_type(): ) # Make the request - response = client.update_entity_type(request=request) + response = await client.update_entity_type(request=request) # Handle the response print(response) @@ -743,9 +743,9 @@ async def delete_entity_type( from google.cloud import dialogflowcx_v3beta1 - def sample_delete_entity_type(): + async def sample_delete_entity_type(): # Create a client - client = dialogflowcx_v3beta1.EntityTypesClient() + client = dialogflowcx_v3beta1.EntityTypesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.DeleteEntityTypeRequest( @@ -753,7 +753,7 @@ def sample_delete_entity_type(): ) # Make the request - client.delete_entity_type(request=request) + await client.delete_entity_type(request=request) Args: request (Union[google.cloud.dialogflowcx_v3beta1.types.DeleteEntityTypeRequest, dict]): diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/environments/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/environments/async_client.py index 06befffdec6f..879f40cbe3e3 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/environments/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/environments/async_client.py @@ -236,9 +236,9 @@ async def list_environments( from google.cloud import dialogflowcx_v3beta1 - def sample_list_environments(): + async def sample_list_environments(): # Create a client - client = dialogflowcx_v3beta1.EnvironmentsClient() + client = dialogflowcx_v3beta1.EnvironmentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ListEnvironmentsRequest( @@ -249,7 +249,7 @@ def sample_list_environments(): page_result = client.list_environments(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -347,9 +347,9 @@ async def get_environment( from google.cloud import dialogflowcx_v3beta1 - def sample_get_environment(): + async def sample_get_environment(): # Create a client - client = dialogflowcx_v3beta1.EnvironmentsClient() + client = dialogflowcx_v3beta1.EnvironmentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.GetEnvironmentRequest( @@ -357,7 +357,7 @@ def sample_get_environment(): ) # Make the request - response = client.get_environment(request=request) + response = await client.get_environment(request=request) # Handle the response print(response) @@ -470,9 +470,9 @@ async def create_environment( from google.cloud import dialogflowcx_v3beta1 - def sample_create_environment(): + async def sample_create_environment(): # Create a client - client = dialogflowcx_v3beta1.EnvironmentsClient() + client = dialogflowcx_v3beta1.EnvironmentsAsyncClient() # Initialize request argument(s) environment = dialogflowcx_v3beta1.Environment() @@ -489,7 +489,7 @@ def sample_create_environment(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -616,9 +616,9 @@ async def update_environment( from google.cloud import dialogflowcx_v3beta1 - def sample_update_environment(): + async def sample_update_environment(): # Create a client - client = dialogflowcx_v3beta1.EnvironmentsClient() + client = dialogflowcx_v3beta1.EnvironmentsAsyncClient() # Initialize request argument(s) environment = dialogflowcx_v3beta1.Environment() @@ -634,7 +634,7 @@ def sample_update_environment(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -748,9 +748,9 @@ async def delete_environment( from google.cloud import dialogflowcx_v3beta1 - def sample_delete_environment(): + async def sample_delete_environment(): # Create a client - client = dialogflowcx_v3beta1.EnvironmentsClient() + client = dialogflowcx_v3beta1.EnvironmentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.DeleteEnvironmentRequest( @@ -758,7 +758,7 @@ def sample_delete_environment(): ) # Make the request - client.delete_environment(request=request) + await client.delete_environment(request=request) Args: request (Union[google.cloud.dialogflowcx_v3beta1.types.DeleteEnvironmentRequest, dict]): @@ -834,9 +834,9 @@ async def lookup_environment_history( from google.cloud import dialogflowcx_v3beta1 - def sample_lookup_environment_history(): + async def sample_lookup_environment_history(): # Create a client - client = dialogflowcx_v3beta1.EnvironmentsClient() + client = dialogflowcx_v3beta1.EnvironmentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.LookupEnvironmentHistoryRequest( @@ -847,7 +847,7 @@ def sample_lookup_environment_history(): page_result = client.lookup_environment_history(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -953,9 +953,9 @@ async def run_continuous_test( from google.cloud import dialogflowcx_v3beta1 - def sample_run_continuous_test(): + async def sample_run_continuous_test(): # Create a client - client = dialogflowcx_v3beta1.EnvironmentsClient() + client = dialogflowcx_v3beta1.EnvironmentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.RunContinuousTestRequest( @@ -967,7 +967,7 @@ def sample_run_continuous_test(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1046,9 +1046,9 @@ async def list_continuous_test_results( from google.cloud import dialogflowcx_v3beta1 - def sample_list_continuous_test_results(): + async def sample_list_continuous_test_results(): # Create a client - client = dialogflowcx_v3beta1.EnvironmentsClient() + client = dialogflowcx_v3beta1.EnvironmentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ListContinuousTestResultsRequest( @@ -1059,7 +1059,7 @@ def sample_list_continuous_test_results(): page_result = client.list_continuous_test_results(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -1164,9 +1164,9 @@ async def deploy_flow( from google.cloud import dialogflowcx_v3beta1 - def sample_deploy_flow(): + async def sample_deploy_flow(): # Create a client - client = dialogflowcx_v3beta1.EnvironmentsClient() + client = dialogflowcx_v3beta1.EnvironmentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.DeployFlowRequest( @@ -1179,7 +1179,7 @@ def sample_deploy_flow(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/experiments/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/experiments/async_client.py index a8000446ab49..3e32167e0b9f 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/experiments/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/experiments/async_client.py @@ -222,9 +222,9 @@ async def list_experiments( from google.cloud import dialogflowcx_v3beta1 - def sample_list_experiments(): + async def sample_list_experiments(): # Create a client - client = dialogflowcx_v3beta1.ExperimentsClient() + client = dialogflowcx_v3beta1.ExperimentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ListExperimentsRequest( @@ -235,7 +235,7 @@ def sample_list_experiments(): page_result = client.list_experiments(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -333,9 +333,9 @@ async def get_experiment( from google.cloud import dialogflowcx_v3beta1 - def sample_get_experiment(): + async def sample_get_experiment(): # Create a client - client = dialogflowcx_v3beta1.ExperimentsClient() + client = dialogflowcx_v3beta1.ExperimentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.GetExperimentRequest( @@ -343,7 +343,7 @@ def sample_get_experiment(): ) # Make the request - response = client.get_experiment(request=request) + response = await client.get_experiment(request=request) # Handle the response print(response) @@ -434,9 +434,9 @@ async def create_experiment( from google.cloud import dialogflowcx_v3beta1 - def sample_create_experiment(): + async def sample_create_experiment(): # Create a client - client = dialogflowcx_v3beta1.ExperimentsClient() + client = dialogflowcx_v3beta1.ExperimentsAsyncClient() # Initialize request argument(s) experiment = dialogflowcx_v3beta1.Experiment() @@ -448,7 +448,7 @@ def sample_create_experiment(): ) # Make the request - response = client.create_experiment(request=request) + response = await client.create_experiment(request=request) # Handle the response print(response) @@ -546,9 +546,9 @@ async def update_experiment( from google.cloud import dialogflowcx_v3beta1 - def sample_update_experiment(): + async def sample_update_experiment(): # Create a client - client = dialogflowcx_v3beta1.ExperimentsClient() + client = dialogflowcx_v3beta1.ExperimentsAsyncClient() # Initialize request argument(s) experiment = dialogflowcx_v3beta1.Experiment() @@ -559,7 +559,7 @@ def sample_update_experiment(): ) # Make the request - response = client.update_experiment(request=request) + response = await client.update_experiment(request=request) # Handle the response print(response) @@ -654,9 +654,9 @@ async def delete_experiment( from google.cloud import dialogflowcx_v3beta1 - def sample_delete_experiment(): + async def sample_delete_experiment(): # Create a client - client = dialogflowcx_v3beta1.ExperimentsClient() + client = dialogflowcx_v3beta1.ExperimentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.DeleteExperimentRequest( @@ -664,7 +664,7 @@ def sample_delete_experiment(): ) # Make the request - client.delete_experiment(request=request) + await client.delete_experiment(request=request) Args: request (Union[google.cloud.dialogflowcx_v3beta1.types.DeleteExperimentRequest, dict]): @@ -742,9 +742,9 @@ async def start_experiment( from google.cloud import dialogflowcx_v3beta1 - def sample_start_experiment(): + async def sample_start_experiment(): # Create a client - client = dialogflowcx_v3beta1.ExperimentsClient() + client = dialogflowcx_v3beta1.ExperimentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.StartExperimentRequest( @@ -752,7 +752,7 @@ def sample_start_experiment(): ) # Make the request - response = client.start_experiment(request=request) + response = await client.start_experiment(request=request) # Handle the response print(response) @@ -841,9 +841,9 @@ async def stop_experiment( from google.cloud import dialogflowcx_v3beta1 - def sample_stop_experiment(): + async def sample_stop_experiment(): # Create a client - client = dialogflowcx_v3beta1.ExperimentsClient() + client = dialogflowcx_v3beta1.ExperimentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.StopExperimentRequest( @@ -851,7 +851,7 @@ def sample_stop_experiment(): ) # Make the request - response = client.stop_experiment(request=request) + response = await client.stop_experiment(request=request) # Handle the response print(response) diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/flows/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/flows/async_client.py index c32a2277b6a6..8b8c961d1419 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/flows/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/flows/async_client.py @@ -237,9 +237,9 @@ async def create_flow( from google.cloud import dialogflowcx_v3beta1 - def sample_create_flow(): + async def sample_create_flow(): # Create a client - client = dialogflowcx_v3beta1.FlowsClient() + client = dialogflowcx_v3beta1.FlowsAsyncClient() # Initialize request argument(s) flow = dialogflowcx_v3beta1.Flow() @@ -251,7 +251,7 @@ def sample_create_flow(): ) # Make the request - response = client.create_flow(request=request) + response = await client.create_flow(request=request) # Handle the response print(response) @@ -364,9 +364,9 @@ async def delete_flow( from google.cloud import dialogflowcx_v3beta1 - def sample_delete_flow(): + async def sample_delete_flow(): # Create a client - client = dialogflowcx_v3beta1.FlowsClient() + client = dialogflowcx_v3beta1.FlowsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.DeleteFlowRequest( @@ -374,7 +374,7 @@ def sample_delete_flow(): ) # Make the request - client.delete_flow(request=request) + await client.delete_flow(request=request) Args: request (Union[google.cloud.dialogflowcx_v3beta1.types.DeleteFlowRequest, dict]): @@ -447,9 +447,9 @@ async def list_flows( from google.cloud import dialogflowcx_v3beta1 - def sample_list_flows(): + async def sample_list_flows(): # Create a client - client = dialogflowcx_v3beta1.FlowsClient() + client = dialogflowcx_v3beta1.FlowsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ListFlowsRequest( @@ -460,7 +460,7 @@ def sample_list_flows(): page_result = client.list_flows(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -555,9 +555,9 @@ async def get_flow( from google.cloud import dialogflowcx_v3beta1 - def sample_get_flow(): + async def sample_get_flow(): # Create a client - client = dialogflowcx_v3beta1.FlowsClient() + client = dialogflowcx_v3beta1.FlowsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.GetFlowRequest( @@ -565,7 +565,7 @@ def sample_get_flow(): ) # Make the request - response = client.get_flow(request=request) + response = await client.get_flow(request=request) # Handle the response print(response) @@ -676,9 +676,9 @@ async def update_flow( from google.cloud import dialogflowcx_v3beta1 - def sample_update_flow(): + async def sample_update_flow(): # Create a client - client = dialogflowcx_v3beta1.FlowsClient() + client = dialogflowcx_v3beta1.FlowsAsyncClient() # Initialize request argument(s) flow = dialogflowcx_v3beta1.Flow() @@ -689,7 +689,7 @@ def sample_update_flow(): ) # Make the request - response = client.update_flow(request=request) + response = await client.update_flow(request=request) # Handle the response print(response) @@ -820,9 +820,9 @@ async def train_flow( from google.cloud import dialogflowcx_v3beta1 - def sample_train_flow(): + async def sample_train_flow(): # Create a client - client = dialogflowcx_v3beta1.FlowsClient() + client = dialogflowcx_v3beta1.FlowsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.TrainFlowRequest( @@ -834,7 +834,7 @@ def sample_train_flow(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -942,9 +942,9 @@ async def validate_flow( from google.cloud import dialogflowcx_v3beta1 - def sample_validate_flow(): + async def sample_validate_flow(): # Create a client - client = dialogflowcx_v3beta1.FlowsClient() + client = dialogflowcx_v3beta1.FlowsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ValidateFlowRequest( @@ -952,7 +952,7 @@ def sample_validate_flow(): ) # Make the request - response = client.validate_flow(request=request) + response = await client.validate_flow(request=request) # Handle the response print(response) @@ -1017,9 +1017,9 @@ async def get_flow_validation_result( from google.cloud import dialogflowcx_v3beta1 - def sample_get_flow_validation_result(): + async def sample_get_flow_validation_result(): # Create a client - client = dialogflowcx_v3beta1.FlowsClient() + client = dialogflowcx_v3beta1.FlowsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.GetFlowValidationResultRequest( @@ -1027,7 +1027,7 @@ def sample_get_flow_validation_result(): ) # Make the request - response = client.get_flow_validation_result(request=request) + response = await client.get_flow_validation_result(request=request) # Handle the response print(response) @@ -1126,9 +1126,9 @@ async def import_flow( from google.cloud import dialogflowcx_v3beta1 - def sample_import_flow(): + async def sample_import_flow(): # Create a client - client = dialogflowcx_v3beta1.FlowsClient() + client = dialogflowcx_v3beta1.FlowsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ImportFlowRequest( @@ -1141,7 +1141,7 @@ def sample_import_flow(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1229,9 +1229,9 @@ async def export_flow( from google.cloud import dialogflowcx_v3beta1 - def sample_export_flow(): + async def sample_export_flow(): # Create a client - client = dialogflowcx_v3beta1.FlowsClient() + client = dialogflowcx_v3beta1.FlowsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ExportFlowRequest( @@ -1243,7 +1243,7 @@ def sample_export_flow(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/intents/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/intents/async_client.py index 0fe1ac01d6af..d8041b7ff77a 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/intents/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/intents/async_client.py @@ -216,9 +216,9 @@ async def list_intents( from google.cloud import dialogflowcx_v3beta1 - def sample_list_intents(): + async def sample_list_intents(): # Create a client - client = dialogflowcx_v3beta1.IntentsClient() + client = dialogflowcx_v3beta1.IntentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ListIntentsRequest( @@ -229,7 +229,7 @@ def sample_list_intents(): page_result = client.list_intents(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -324,9 +324,9 @@ async def get_intent( from google.cloud import dialogflowcx_v3beta1 - def sample_get_intent(): + async def sample_get_intent(): # Create a client - client = dialogflowcx_v3beta1.IntentsClient() + client = dialogflowcx_v3beta1.IntentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.GetIntentRequest( @@ -334,7 +334,7 @@ def sample_get_intent(): ) # Make the request - response = client.get_intent(request=request) + response = await client.get_intent(request=request) # Handle the response print(response) @@ -429,9 +429,9 @@ async def create_intent( from google.cloud import dialogflowcx_v3beta1 - def sample_create_intent(): + async def sample_create_intent(): # Create a client - client = dialogflowcx_v3beta1.IntentsClient() + client = dialogflowcx_v3beta1.IntentsAsyncClient() # Initialize request argument(s) intent = dialogflowcx_v3beta1.Intent() @@ -443,7 +443,7 @@ def sample_create_intent(): ) # Make the request - response = client.create_intent(request=request) + response = await client.create_intent(request=request) # Handle the response print(response) @@ -545,9 +545,9 @@ async def update_intent( from google.cloud import dialogflowcx_v3beta1 - def sample_update_intent(): + async def sample_update_intent(): # Create a client - client = dialogflowcx_v3beta1.IntentsClient() + client = dialogflowcx_v3beta1.IntentsAsyncClient() # Initialize request argument(s) intent = dialogflowcx_v3beta1.Intent() @@ -558,7 +558,7 @@ def sample_update_intent(): ) # Make the request - response = client.update_intent(request=request) + response = await client.update_intent(request=request) # Handle the response print(response) @@ -662,9 +662,9 @@ async def delete_intent( from google.cloud import dialogflowcx_v3beta1 - def sample_delete_intent(): + async def sample_delete_intent(): # Create a client - client = dialogflowcx_v3beta1.IntentsClient() + client = dialogflowcx_v3beta1.IntentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.DeleteIntentRequest( @@ -672,7 +672,7 @@ def sample_delete_intent(): ) # Make the request - client.delete_intent(request=request) + await client.delete_intent(request=request) Args: request (Union[google.cloud.dialogflowcx_v3beta1.types.DeleteIntentRequest, dict]): diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/pages/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/pages/async_client.py index ecfa92533583..b6e498079fca 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/pages/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/pages/async_client.py @@ -224,9 +224,9 @@ async def list_pages( from google.cloud import dialogflowcx_v3beta1 - def sample_list_pages(): + async def sample_list_pages(): # Create a client - client = dialogflowcx_v3beta1.PagesClient() + client = dialogflowcx_v3beta1.PagesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ListPagesRequest( @@ -237,7 +237,7 @@ def sample_list_pages(): page_result = client.list_pages(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -332,9 +332,9 @@ async def get_page( from google.cloud import dialogflowcx_v3beta1 - def sample_get_page(): + async def sample_get_page(): # Create a client - client = dialogflowcx_v3beta1.PagesClient() + client = dialogflowcx_v3beta1.PagesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.GetPageRequest( @@ -342,7 +342,7 @@ def sample_get_page(): ) # Make the request - response = client.get_page(request=request) + response = await client.get_page(request=request) # Handle the response print(response) @@ -448,9 +448,9 @@ async def create_page( from google.cloud import dialogflowcx_v3beta1 - def sample_create_page(): + async def sample_create_page(): # Create a client - client = dialogflowcx_v3beta1.PagesClient() + client = dialogflowcx_v3beta1.PagesAsyncClient() # Initialize request argument(s) page = dialogflowcx_v3beta1.Page() @@ -462,7 +462,7 @@ def sample_create_page(): ) # Make the request - response = client.create_page(request=request) + response = await client.create_page(request=request) # Handle the response print(response) @@ -575,9 +575,9 @@ async def update_page( from google.cloud import dialogflowcx_v3beta1 - def sample_update_page(): + async def sample_update_page(): # Create a client - client = dialogflowcx_v3beta1.PagesClient() + client = dialogflowcx_v3beta1.PagesAsyncClient() # Initialize request argument(s) page = dialogflowcx_v3beta1.Page() @@ -588,7 +588,7 @@ def sample_update_page(): ) # Make the request - response = client.update_page(request=request) + response = await client.update_page(request=request) # Handle the response print(response) @@ -703,9 +703,9 @@ async def delete_page( from google.cloud import dialogflowcx_v3beta1 - def sample_delete_page(): + async def sample_delete_page(): # Create a client - client = dialogflowcx_v3beta1.PagesClient() + client = dialogflowcx_v3beta1.PagesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.DeletePageRequest( @@ -713,7 +713,7 @@ def sample_delete_page(): ) # Make the request - client.delete_page(request=request) + await client.delete_page(request=request) Args: request (Union[google.cloud.dialogflowcx_v3beta1.types.DeletePageRequest, dict]): diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/security_settings_service/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/security_settings_service/async_client.py index 51c4e522bb97..c967a52c85d1 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/security_settings_service/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/security_settings_service/async_client.py @@ -245,9 +245,9 @@ async def create_security_settings( from google.cloud import dialogflowcx_v3beta1 - def sample_create_security_settings(): + async def sample_create_security_settings(): # Create a client - client = dialogflowcx_v3beta1.SecuritySettingsServiceClient() + client = dialogflowcx_v3beta1.SecuritySettingsServiceAsyncClient() # Initialize request argument(s) security_settings = dialogflowcx_v3beta1.SecuritySettings() @@ -260,7 +260,7 @@ def sample_create_security_settings(): ) # Make the request - response = client.create_security_settings(request=request) + response = await client.create_security_settings(request=request) # Handle the response print(response) @@ -362,9 +362,9 @@ async def get_security_settings( from google.cloud import dialogflowcx_v3beta1 - def sample_get_security_settings(): + async def sample_get_security_settings(): # Create a client - client = dialogflowcx_v3beta1.SecuritySettingsServiceClient() + client = dialogflowcx_v3beta1.SecuritySettingsServiceAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.GetSecuritySettingsRequest( @@ -372,7 +372,7 @@ def sample_get_security_settings(): ) # Make the request - response = client.get_security_settings(request=request) + response = await client.get_security_settings(request=request) # Handle the response print(response) @@ -465,9 +465,9 @@ async def update_security_settings( from google.cloud import dialogflowcx_v3beta1 - def sample_update_security_settings(): + async def sample_update_security_settings(): # Create a client - client = dialogflowcx_v3beta1.SecuritySettingsServiceClient() + client = dialogflowcx_v3beta1.SecuritySettingsServiceAsyncClient() # Initialize request argument(s) security_settings = dialogflowcx_v3beta1.SecuritySettings() @@ -479,7 +479,7 @@ def sample_update_security_settings(): ) # Make the request - response = client.update_security_settings(request=request) + response = await client.update_security_settings(request=request) # Handle the response print(response) @@ -581,9 +581,9 @@ async def list_security_settings( from google.cloud import dialogflowcx_v3beta1 - def sample_list_security_settings(): + async def sample_list_security_settings(): # Create a client - client = dialogflowcx_v3beta1.SecuritySettingsServiceClient() + client = dialogflowcx_v3beta1.SecuritySettingsServiceAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ListSecuritySettingsRequest( @@ -594,7 +594,7 @@ def sample_list_security_settings(): page_result = client.list_security_settings(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -691,9 +691,9 @@ async def delete_security_settings( from google.cloud import dialogflowcx_v3beta1 - def sample_delete_security_settings(): + async def sample_delete_security_settings(): # Create a client - client = dialogflowcx_v3beta1.SecuritySettingsServiceClient() + client = dialogflowcx_v3beta1.SecuritySettingsServiceAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.DeleteSecuritySettingsRequest( @@ -701,7 +701,7 @@ def sample_delete_security_settings(): ) # Make the request - client.delete_security_settings(request=request) + await client.delete_security_settings(request=request) Args: request (Union[google.cloud.dialogflowcx_v3beta1.types.DeleteSecuritySettingsRequest, dict]): diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/session_entity_types/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/session_entity_types/async_client.py index 8a36b2336394..9b2d0f0bffdb 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/session_entity_types/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/session_entity_types/async_client.py @@ -230,9 +230,9 @@ async def list_session_entity_types( from google.cloud import dialogflowcx_v3beta1 - def sample_list_session_entity_types(): + async def sample_list_session_entity_types(): # Create a client - client = dialogflowcx_v3beta1.SessionEntityTypesClient() + client = dialogflowcx_v3beta1.SessionEntityTypesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ListSessionEntityTypesRequest( @@ -243,7 +243,7 @@ def sample_list_session_entity_types(): page_result = client.list_session_entity_types(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -343,9 +343,9 @@ async def get_session_entity_type( from google.cloud import dialogflowcx_v3beta1 - def sample_get_session_entity_type(): + async def sample_get_session_entity_type(): # Create a client - client = dialogflowcx_v3beta1.SessionEntityTypesClient() + client = dialogflowcx_v3beta1.SessionEntityTypesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.GetSessionEntityTypeRequest( @@ -353,7 +353,7 @@ def sample_get_session_entity_type(): ) # Make the request - response = client.get_session_entity_type(request=request) + response = await client.get_session_entity_type(request=request) # Handle the response print(response) @@ -460,9 +460,9 @@ async def create_session_entity_type( from google.cloud import dialogflowcx_v3beta1 - def sample_create_session_entity_type(): + async def sample_create_session_entity_type(): # Create a client - client = dialogflowcx_v3beta1.SessionEntityTypesClient() + client = dialogflowcx_v3beta1.SessionEntityTypesAsyncClient() # Initialize request argument(s) session_entity_type = dialogflowcx_v3beta1.SessionEntityType() @@ -477,7 +477,7 @@ def sample_create_session_entity_type(): ) # Make the request - response = client.create_session_entity_type(request=request) + response = await client.create_session_entity_type(request=request) # Handle the response print(response) @@ -594,9 +594,9 @@ async def update_session_entity_type( from google.cloud import dialogflowcx_v3beta1 - def sample_update_session_entity_type(): + async def sample_update_session_entity_type(): # Create a client - client = dialogflowcx_v3beta1.SessionEntityTypesClient() + client = dialogflowcx_v3beta1.SessionEntityTypesAsyncClient() # Initialize request argument(s) session_entity_type = dialogflowcx_v3beta1.SessionEntityType() @@ -610,7 +610,7 @@ def sample_update_session_entity_type(): ) # Make the request - response = client.update_session_entity_type(request=request) + response = await client.update_session_entity_type(request=request) # Handle the response print(response) @@ -725,9 +725,9 @@ async def delete_session_entity_type( from google.cloud import dialogflowcx_v3beta1 - def sample_delete_session_entity_type(): + async def sample_delete_session_entity_type(): # Create a client - client = dialogflowcx_v3beta1.SessionEntityTypesClient() + client = dialogflowcx_v3beta1.SessionEntityTypesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.DeleteSessionEntityTypeRequest( @@ -735,7 +735,7 @@ def sample_delete_session_entity_type(): ) # Make the request - client.delete_session_entity_type(request=request) + await client.delete_session_entity_type(request=request) Args: request (Union[google.cloud.dialogflowcx_v3beta1.types.DeleteSessionEntityTypeRequest, dict]): diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/sessions/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/sessions/async_client.py index c92f7c0c67a2..157a8a2426dc 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/sessions/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/sessions/async_client.py @@ -253,9 +253,9 @@ async def detect_intent( from google.cloud import dialogflowcx_v3beta1 - def sample_detect_intent(): + async def sample_detect_intent(): # Create a client - client = dialogflowcx_v3beta1.SessionsClient() + client = dialogflowcx_v3beta1.SessionsAsyncClient() # Initialize request argument(s) query_input = dialogflowcx_v3beta1.QueryInput() @@ -268,7 +268,7 @@ def sample_detect_intent(): ) # Make the request - response = client.detect_intent(request=request) + response = await client.detect_intent(request=request) # Handle the response print(response) @@ -346,9 +346,9 @@ def streaming_detect_intent( from google.cloud import dialogflowcx_v3beta1 - def sample_streaming_detect_intent(): + async def sample_streaming_detect_intent(): # Create a client - client = dialogflowcx_v3beta1.SessionsClient() + client = dialogflowcx_v3beta1.SessionsAsyncClient() # Initialize request argument(s) query_input = dialogflowcx_v3beta1.QueryInput() @@ -370,10 +370,10 @@ def request_generator(): yield request # Make the request - stream = client.streaming_detect_intent(requests=request_generator()) + stream = await client.streaming_detect_intent(requests=request_generator()) # Handle the response - for response in stream: + async for response in stream: print(response) Args: @@ -489,9 +489,9 @@ async def match_intent( from google.cloud import dialogflowcx_v3beta1 - def sample_match_intent(): + async def sample_match_intent(): # Create a client - client = dialogflowcx_v3beta1.SessionsClient() + client = dialogflowcx_v3beta1.SessionsAsyncClient() # Initialize request argument(s) query_input = dialogflowcx_v3beta1.QueryInput() @@ -504,7 +504,7 @@ def sample_match_intent(): ) # Make the request - response = client.match_intent(request=request) + response = await client.match_intent(request=request) # Handle the response print(response) @@ -570,16 +570,16 @@ async def fulfill_intent( from google.cloud import dialogflowcx_v3beta1 - def sample_fulfill_intent(): + async def sample_fulfill_intent(): # Create a client - client = dialogflowcx_v3beta1.SessionsClient() + client = dialogflowcx_v3beta1.SessionsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.FulfillIntentRequest( ) # Make the request - response = client.fulfill_intent(request=request) + response = await client.fulfill_intent(request=request) # Handle the response print(response) diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/test_cases/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/test_cases/async_client.py index 8ab99fad97a0..80cb83266ffc 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/test_cases/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/test_cases/async_client.py @@ -243,9 +243,9 @@ async def list_test_cases( from google.cloud import dialogflowcx_v3beta1 - def sample_list_test_cases(): + async def sample_list_test_cases(): # Create a client - client = dialogflowcx_v3beta1.TestCasesClient() + client = dialogflowcx_v3beta1.TestCasesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ListTestCasesRequest( @@ -256,7 +256,7 @@ def sample_list_test_cases(): page_result = client.list_test_cases(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -351,9 +351,9 @@ async def batch_delete_test_cases( from google.cloud import dialogflowcx_v3beta1 - def sample_batch_delete_test_cases(): + async def sample_batch_delete_test_cases(): # Create a client - client = dialogflowcx_v3beta1.TestCasesClient() + client = dialogflowcx_v3beta1.TestCasesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.BatchDeleteTestCasesRequest( @@ -362,7 +362,7 @@ def sample_batch_delete_test_cases(): ) # Make the request - client.batch_delete_test_cases(request=request) + await client.batch_delete_test_cases(request=request) Args: request (Union[google.cloud.dialogflowcx_v3beta1.types.BatchDeleteTestCasesRequest, dict]): @@ -435,9 +435,9 @@ async def get_test_case( from google.cloud import dialogflowcx_v3beta1 - def sample_get_test_case(): + async def sample_get_test_case(): # Create a client - client = dialogflowcx_v3beta1.TestCasesClient() + client = dialogflowcx_v3beta1.TestCasesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.GetTestCaseRequest( @@ -445,7 +445,7 @@ def sample_get_test_case(): ) # Make the request - response = client.get_test_case(request=request) + response = await client.get_test_case(request=request) # Handle the response print(response) @@ -529,9 +529,9 @@ async def create_test_case( from google.cloud import dialogflowcx_v3beta1 - def sample_create_test_case(): + async def sample_create_test_case(): # Create a client - client = dialogflowcx_v3beta1.TestCasesClient() + client = dialogflowcx_v3beta1.TestCasesAsyncClient() # Initialize request argument(s) test_case = dialogflowcx_v3beta1.TestCase() @@ -543,7 +543,7 @@ def sample_create_test_case(): ) # Make the request - response = client.create_test_case(request=request) + response = await client.create_test_case(request=request) # Handle the response print(response) @@ -634,9 +634,9 @@ async def update_test_case( from google.cloud import dialogflowcx_v3beta1 - def sample_update_test_case(): + async def sample_update_test_case(): # Create a client - client = dialogflowcx_v3beta1.TestCasesClient() + client = dialogflowcx_v3beta1.TestCasesAsyncClient() # Initialize request argument(s) test_case = dialogflowcx_v3beta1.TestCase() @@ -647,7 +647,7 @@ def sample_update_test_case(): ) # Make the request - response = client.update_test_case(request=request) + response = await client.update_test_case(request=request) # Handle the response print(response) @@ -752,9 +752,9 @@ async def run_test_case( from google.cloud import dialogflowcx_v3beta1 - def sample_run_test_case(): + async def sample_run_test_case(): # Create a client - client = dialogflowcx_v3beta1.TestCasesClient() + client = dialogflowcx_v3beta1.TestCasesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.RunTestCaseRequest( @@ -766,7 +766,7 @@ def sample_run_test_case(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -851,9 +851,9 @@ async def batch_run_test_cases( from google.cloud import dialogflowcx_v3beta1 - def sample_batch_run_test_cases(): + async def sample_batch_run_test_cases(): # Create a client - client = dialogflowcx_v3beta1.TestCasesClient() + client = dialogflowcx_v3beta1.TestCasesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.BatchRunTestCasesRequest( @@ -866,7 +866,7 @@ def sample_batch_run_test_cases(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -941,9 +941,9 @@ async def calculate_coverage( from google.cloud import dialogflowcx_v3beta1 - def sample_calculate_coverage(): + async def sample_calculate_coverage(): # Create a client - client = dialogflowcx_v3beta1.TestCasesClient() + client = dialogflowcx_v3beta1.TestCasesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.CalculateCoverageRequest( @@ -952,7 +952,7 @@ def sample_calculate_coverage(): ) # Make the request - response = client.calculate_coverage(request=request) + response = await client.calculate_coverage(request=request) # Handle the response print(response) @@ -1028,9 +1028,9 @@ async def import_test_cases( from google.cloud import dialogflowcx_v3beta1 - def sample_import_test_cases(): + async def sample_import_test_cases(): # Create a client - client = dialogflowcx_v3beta1.TestCasesClient() + client = dialogflowcx_v3beta1.TestCasesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ImportTestCasesRequest( @@ -1043,7 +1043,7 @@ def sample_import_test_cases(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1130,9 +1130,9 @@ async def export_test_cases( from google.cloud import dialogflowcx_v3beta1 - def sample_export_test_cases(): + async def sample_export_test_cases(): # Create a client - client = dialogflowcx_v3beta1.TestCasesClient() + client = dialogflowcx_v3beta1.TestCasesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ExportTestCasesRequest( @@ -1145,7 +1145,7 @@ def sample_export_test_cases(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1221,9 +1221,9 @@ async def list_test_case_results( from google.cloud import dialogflowcx_v3beta1 - def sample_list_test_case_results(): + async def sample_list_test_case_results(): # Create a client - client = dialogflowcx_v3beta1.TestCasesClient() + client = dialogflowcx_v3beta1.TestCasesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ListTestCaseResultsRequest( @@ -1234,7 +1234,7 @@ def sample_list_test_case_results(): page_result = client.list_test_case_results(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -1331,9 +1331,9 @@ async def get_test_case_result( from google.cloud import dialogflowcx_v3beta1 - def sample_get_test_case_result(): + async def sample_get_test_case_result(): # Create a client - client = dialogflowcx_v3beta1.TestCasesClient() + client = dialogflowcx_v3beta1.TestCasesAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.GetTestCaseResultRequest( @@ -1341,7 +1341,7 @@ def sample_get_test_case_result(): ) # Make the request - response = client.get_test_case_result(request=request) + response = await client.get_test_case_result(request=request) # Handle the response print(response) diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/transition_route_groups/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/transition_route_groups/async_client.py index cac8c1d48a8b..3364965eb117 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/transition_route_groups/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/transition_route_groups/async_client.py @@ -242,9 +242,9 @@ async def list_transition_route_groups( from google.cloud import dialogflowcx_v3beta1 - def sample_list_transition_route_groups(): + async def sample_list_transition_route_groups(): # Create a client - client = dialogflowcx_v3beta1.TransitionRouteGroupsClient() + client = dialogflowcx_v3beta1.TransitionRouteGroupsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ListTransitionRouteGroupsRequest( @@ -255,7 +255,7 @@ def sample_list_transition_route_groups(): page_result = client.list_transition_route_groups(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -354,9 +354,9 @@ async def get_transition_route_group( from google.cloud import dialogflowcx_v3beta1 - def sample_get_transition_route_group(): + async def sample_get_transition_route_group(): # Create a client - client = dialogflowcx_v3beta1.TransitionRouteGroupsClient() + client = dialogflowcx_v3beta1.TransitionRouteGroupsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.GetTransitionRouteGroupRequest( @@ -364,7 +364,7 @@ def sample_get_transition_route_group(): ) # Make the request - response = client.get_transition_route_group(request=request) + response = await client.get_transition_route_group(request=request) # Handle the response print(response) @@ -462,9 +462,9 @@ async def create_transition_route_group( from google.cloud import dialogflowcx_v3beta1 - def sample_create_transition_route_group(): + async def sample_create_transition_route_group(): # Create a client - client = dialogflowcx_v3beta1.TransitionRouteGroupsClient() + client = dialogflowcx_v3beta1.TransitionRouteGroupsAsyncClient() # Initialize request argument(s) transition_route_group = dialogflowcx_v3beta1.TransitionRouteGroup() @@ -476,7 +476,7 @@ def sample_create_transition_route_group(): ) # Make the request - response = client.create_transition_route_group(request=request) + response = await client.create_transition_route_group(request=request) # Handle the response print(response) @@ -582,9 +582,9 @@ async def update_transition_route_group( from google.cloud import dialogflowcx_v3beta1 - def sample_update_transition_route_group(): + async def sample_update_transition_route_group(): # Create a client - client = dialogflowcx_v3beta1.TransitionRouteGroupsClient() + client = dialogflowcx_v3beta1.TransitionRouteGroupsAsyncClient() # Initialize request argument(s) transition_route_group = dialogflowcx_v3beta1.TransitionRouteGroup() @@ -595,7 +595,7 @@ def sample_update_transition_route_group(): ) # Make the request - response = client.update_transition_route_group(request=request) + response = await client.update_transition_route_group(request=request) # Handle the response print(response) @@ -700,9 +700,9 @@ async def delete_transition_route_group( from google.cloud import dialogflowcx_v3beta1 - def sample_delete_transition_route_group(): + async def sample_delete_transition_route_group(): # Create a client - client = dialogflowcx_v3beta1.TransitionRouteGroupsClient() + client = dialogflowcx_v3beta1.TransitionRouteGroupsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.DeleteTransitionRouteGroupRequest( @@ -710,7 +710,7 @@ def sample_delete_transition_route_group(): ) # Make the request - client.delete_transition_route_group(request=request) + await client.delete_transition_route_group(request=request) Args: request (Union[google.cloud.dialogflowcx_v3beta1.types.DeleteTransitionRouteGroupRequest, dict]): diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/versions/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/versions/async_client.py index 8bf7921d7500..62123892ac2d 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/versions/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/versions/async_client.py @@ -220,9 +220,9 @@ async def list_versions( from google.cloud import dialogflowcx_v3beta1 - def sample_list_versions(): + async def sample_list_versions(): # Create a client - client = dialogflowcx_v3beta1.VersionsClient() + client = dialogflowcx_v3beta1.VersionsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ListVersionsRequest( @@ -233,7 +233,7 @@ def sample_list_versions(): page_result = client.list_versions(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -331,9 +331,9 @@ async def get_version( from google.cloud import dialogflowcx_v3beta1 - def sample_get_version(): + async def sample_get_version(): # Create a client - client = dialogflowcx_v3beta1.VersionsClient() + client = dialogflowcx_v3beta1.VersionsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.GetVersionRequest( @@ -341,7 +341,7 @@ def sample_get_version(): ) # Make the request - response = client.get_version(request=request) + response = await client.get_version(request=request) # Handle the response print(response) @@ -439,9 +439,9 @@ async def create_version( from google.cloud import dialogflowcx_v3beta1 - def sample_create_version(): + async def sample_create_version(): # Create a client - client = dialogflowcx_v3beta1.VersionsClient() + client = dialogflowcx_v3beta1.VersionsAsyncClient() # Initialize request argument(s) version = dialogflowcx_v3beta1.Version() @@ -457,7 +457,7 @@ def sample_create_version(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -566,9 +566,9 @@ async def update_version( from google.cloud import dialogflowcx_v3beta1 - def sample_update_version(): + async def sample_update_version(): # Create a client - client = dialogflowcx_v3beta1.VersionsClient() + client = dialogflowcx_v3beta1.VersionsAsyncClient() # Initialize request argument(s) version = dialogflowcx_v3beta1.Version() @@ -579,7 +579,7 @@ def sample_update_version(): ) # Make the request - response = client.update_version(request=request) + response = await client.update_version(request=request) # Handle the response print(response) @@ -673,9 +673,9 @@ async def delete_version( from google.cloud import dialogflowcx_v3beta1 - def sample_delete_version(): + async def sample_delete_version(): # Create a client - client = dialogflowcx_v3beta1.VersionsClient() + client = dialogflowcx_v3beta1.VersionsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.DeleteVersionRequest( @@ -683,7 +683,7 @@ def sample_delete_version(): ) # Make the request - client.delete_version(request=request) + await client.delete_version(request=request) Args: request (Union[google.cloud.dialogflowcx_v3beta1.types.DeleteVersionRequest, dict]): @@ -768,9 +768,9 @@ async def load_version( from google.cloud import dialogflowcx_v3beta1 - def sample_load_version(): + async def sample_load_version(): # Create a client - client = dialogflowcx_v3beta1.VersionsClient() + client = dialogflowcx_v3beta1.VersionsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.LoadVersionRequest( @@ -782,7 +782,7 @@ def sample_load_version(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -891,9 +891,9 @@ async def compare_versions( from google.cloud import dialogflowcx_v3beta1 - def sample_compare_versions(): + async def sample_compare_versions(): # Create a client - client = dialogflowcx_v3beta1.VersionsClient() + client = dialogflowcx_v3beta1.VersionsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.CompareVersionsRequest( @@ -902,7 +902,7 @@ def sample_compare_versions(): ) # Make the request - response = client.compare_versions(request=request) + response = await client.compare_versions(request=request) # Handle the response print(response) diff --git a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/webhooks/async_client.py b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/webhooks/async_client.py index 56b0a574951d..ae18bcf08ff7 100644 --- a/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/webhooks/async_client.py +++ b/packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/webhooks/async_client.py @@ -217,9 +217,9 @@ async def list_webhooks( from google.cloud import dialogflowcx_v3beta1 - def sample_list_webhooks(): + async def sample_list_webhooks(): # Create a client - client = dialogflowcx_v3beta1.WebhooksClient() + client = dialogflowcx_v3beta1.WebhooksAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ListWebhooksRequest( @@ -230,7 +230,7 @@ def sample_list_webhooks(): page_result = client.list_webhooks(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -325,9 +325,9 @@ async def get_webhook( from google.cloud import dialogflowcx_v3beta1 - def sample_get_webhook(): + async def sample_get_webhook(): # Create a client - client = dialogflowcx_v3beta1.WebhooksClient() + client = dialogflowcx_v3beta1.WebhooksAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.GetWebhookRequest( @@ -335,7 +335,7 @@ def sample_get_webhook(): ) # Make the request - response = client.get_webhook(request=request) + response = await client.get_webhook(request=request) # Handle the response print(response) @@ -426,9 +426,9 @@ async def create_webhook( from google.cloud import dialogflowcx_v3beta1 - def sample_create_webhook(): + async def sample_create_webhook(): # Create a client - client = dialogflowcx_v3beta1.WebhooksClient() + client = dialogflowcx_v3beta1.WebhooksAsyncClient() # Initialize request argument(s) webhook = dialogflowcx_v3beta1.Webhook() @@ -441,7 +441,7 @@ def sample_create_webhook(): ) # Make the request - response = client.create_webhook(request=request) + response = await client.create_webhook(request=request) # Handle the response print(response) @@ -539,9 +539,9 @@ async def update_webhook( from google.cloud import dialogflowcx_v3beta1 - def sample_update_webhook(): + async def sample_update_webhook(): # Create a client - client = dialogflowcx_v3beta1.WebhooksClient() + client = dialogflowcx_v3beta1.WebhooksAsyncClient() # Initialize request argument(s) webhook = dialogflowcx_v3beta1.Webhook() @@ -553,7 +553,7 @@ def sample_update_webhook(): ) # Make the request - response = client.update_webhook(request=request) + response = await client.update_webhook(request=request) # Handle the response print(response) @@ -653,9 +653,9 @@ async def delete_webhook( from google.cloud import dialogflowcx_v3beta1 - def sample_delete_webhook(): + async def sample_delete_webhook(): # Create a client - client = dialogflowcx_v3beta1.WebhooksClient() + client = dialogflowcx_v3beta1.WebhooksAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.DeleteWebhookRequest( @@ -663,7 +663,7 @@ def sample_delete_webhook(): ) # Make the request - client.delete_webhook(request=request) + await client.delete_webhook(request=request) Args: request (Union[google.cloud.dialogflowcx_v3beta1.types.DeleteWebhookRequest, dict]): diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_agents.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_agents.py index 054bbe7b2f24..bf3c1c227a8e 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_agents.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_agents.py @@ -712,7 +712,7 @@ def test_list_agents_field_headers(): # a field header. Set these to a non-empty value. request = agent.ListAgentsRequest() - 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_agents), "__call__") as call: @@ -728,7 +728,7 @@ def test_list_agents_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -742,7 +742,7 @@ async def test_list_agents_field_headers_async(): # a field header. Set these to a non-empty value. request = agent.ListAgentsRequest() - 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_agents), "__call__") as call: @@ -760,7 +760,7 @@ async def test_list_agents_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -891,7 +891,7 @@ def test_list_agents_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, agent.Agent) for i in results) @@ -1176,7 +1176,7 @@ def test_get_agent_field_headers(): # a field header. Set these to a non-empty value. request = agent.GetAgentRequest() - 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_agent), "__call__") as call: @@ -1192,7 +1192,7 @@ def test_get_agent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1206,7 +1206,7 @@ async def test_get_agent_field_headers_async(): # a field header. Set these to a non-empty value. request = agent.GetAgentRequest() - 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_agent), "__call__") as call: @@ -1222,7 +1222,7 @@ async def test_get_agent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1448,7 +1448,7 @@ def test_create_agent_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_agent.CreateAgentRequest() - 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_agent), "__call__") as call: @@ -1464,7 +1464,7 @@ def test_create_agent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1478,7 +1478,7 @@ async def test_create_agent_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_agent.CreateAgentRequest() - 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_agent), "__call__") as call: @@ -1494,7 +1494,7 @@ async def test_create_agent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1730,7 +1730,7 @@ def test_update_agent_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_agent.UpdateAgentRequest() - request.agent.name = "agent.name/value" + request.agent.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_agent), "__call__") as call: @@ -1746,7 +1746,7 @@ def test_update_agent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "agent.name=agent.name/value", + "agent.name=name_value", ) in kw["metadata"] @@ -1760,7 +1760,7 @@ async def test_update_agent_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_agent.UpdateAgentRequest() - request.agent.name = "agent.name/value" + request.agent.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_agent), "__call__") as call: @@ -1776,7 +1776,7 @@ async def test_update_agent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "agent.name=agent.name/value", + "agent.name=name_value", ) in kw["metadata"] @@ -1960,7 +1960,7 @@ def test_delete_agent_field_headers(): # a field header. Set these to a non-empty value. request = agent.DeleteAgentRequest() - 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_agent), "__call__") as call: @@ -1976,7 +1976,7 @@ def test_delete_agent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1990,7 +1990,7 @@ async def test_delete_agent_field_headers_async(): # a field header. Set these to a non-empty value. request = agent.DeleteAgentRequest() - 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_agent), "__call__") as call: @@ -2006,7 +2006,7 @@ async def test_delete_agent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2182,7 +2182,7 @@ def test_export_agent_field_headers(): # a field header. Set these to a non-empty value. request = agent.ExportAgentRequest() - 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.export_agent), "__call__") as call: @@ -2198,7 +2198,7 @@ def test_export_agent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2212,7 +2212,7 @@ async def test_export_agent_field_headers_async(): # a field header. Set these to a non-empty value. request = agent.ExportAgentRequest() - 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.export_agent), "__call__") as call: @@ -2230,7 +2230,7 @@ async def test_export_agent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2326,7 +2326,7 @@ def test_restore_agent_field_headers(): # a field header. Set these to a non-empty value. request = agent.RestoreAgentRequest() - 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.restore_agent), "__call__") as call: @@ -2342,7 +2342,7 @@ def test_restore_agent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2356,7 +2356,7 @@ async def test_restore_agent_field_headers_async(): # a field header. Set these to a non-empty value. request = agent.RestoreAgentRequest() - 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.restore_agent), "__call__") as call: @@ -2374,7 +2374,7 @@ async def test_restore_agent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2476,7 +2476,7 @@ def test_validate_agent_field_headers(): # a field header. Set these to a non-empty value. request = agent.ValidateAgentRequest() - 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.validate_agent), "__call__") as call: @@ -2492,7 +2492,7 @@ def test_validate_agent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2506,7 +2506,7 @@ async def test_validate_agent_field_headers_async(): # a field header. Set these to a non-empty value. request = agent.ValidateAgentRequest() - 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.validate_agent), "__call__") as call: @@ -2524,7 +2524,7 @@ async def test_validate_agent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2632,7 +2632,7 @@ def test_get_agent_validation_result_field_headers(): # a field header. Set these to a non-empty value. request = agent.GetAgentValidationResultRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2650,7 +2650,7 @@ def test_get_agent_validation_result_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2664,7 +2664,7 @@ async def test_get_agent_validation_result_field_headers_async(): # a field header. Set these to a non-empty value. request = agent.GetAgentValidationResultRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2684,7 +2684,7 @@ async def test_get_agent_validation_result_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_changelogs.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_changelogs.py index b585b56a606b..e0b970630d9c 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_changelogs.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_changelogs.py @@ -724,7 +724,7 @@ def test_list_changelogs_field_headers(): # a field header. Set these to a non-empty value. request = changelog.ListChangelogsRequest() - 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_changelogs), "__call__") as call: @@ -740,7 +740,7 @@ def test_list_changelogs_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -754,7 +754,7 @@ async def test_list_changelogs_field_headers_async(): # a field header. Set these to a non-empty value. request = changelog.ListChangelogsRequest() - 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_changelogs), "__call__") as call: @@ -772,7 +772,7 @@ async def test_list_changelogs_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -903,7 +903,7 @@ def test_list_changelogs_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, changelog.Changelog) for i in results) @@ -1164,7 +1164,7 @@ def test_get_changelog_field_headers(): # a field header. Set these to a non-empty value. request = changelog.GetChangelogRequest() - 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_changelog), "__call__") as call: @@ -1180,7 +1180,7 @@ def test_get_changelog_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1194,7 +1194,7 @@ async def test_get_changelog_field_headers_async(): # a field header. Set these to a non-empty value. request = changelog.GetChangelogRequest() - 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_changelog), "__call__") as call: @@ -1210,7 +1210,7 @@ async def test_get_changelog_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_deployments.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_deployments.py index 85bd92b56dd9..e53050fe81ef 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_deployments.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_deployments.py @@ -724,7 +724,7 @@ def test_list_deployments_field_headers(): # a field header. Set these to a non-empty value. request = deployment.ListDeploymentsRequest() - 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_deployments), "__call__") as call: @@ -740,7 +740,7 @@ def test_list_deployments_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -754,7 +754,7 @@ async def test_list_deployments_field_headers_async(): # a field header. Set these to a non-empty value. request = deployment.ListDeploymentsRequest() - 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_deployments), "__call__") as call: @@ -772,7 +772,7 @@ async def test_list_deployments_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -903,7 +903,7 @@ def test_list_deployments_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, deployment.Deployment) for i in results) @@ -1152,7 +1152,7 @@ def test_get_deployment_field_headers(): # a field header. Set these to a non-empty value. request = deployment.GetDeploymentRequest() - 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_deployment), "__call__") as call: @@ -1168,7 +1168,7 @@ def test_get_deployment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1182,7 +1182,7 @@ async def test_get_deployment_field_headers_async(): # a field header. Set these to a non-empty value. request = deployment.GetDeploymentRequest() - 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_deployment), "__call__") as call: @@ -1200,7 +1200,7 @@ async def test_get_deployment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_entity_types.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_entity_types.py index d976525727f7..d205edfe8b4e 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_entity_types.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_entity_types.py @@ -731,7 +731,7 @@ def test_list_entity_types_field_headers(): # a field header. Set these to a non-empty value. request = entity_type.ListEntityTypesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -749,7 +749,7 @@ def test_list_entity_types_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -763,7 +763,7 @@ async def test_list_entity_types_field_headers_async(): # a field header. Set these to a non-empty value. request = entity_type.ListEntityTypesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -783,7 +783,7 @@ async def test_list_entity_types_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -920,7 +920,7 @@ def test_list_entity_types_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, entity_type.EntityType) for i in results) @@ -1193,7 +1193,7 @@ def test_get_entity_type_field_headers(): # a field header. Set these to a non-empty value. request = entity_type.GetEntityTypeRequest() - 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_entity_type), "__call__") as call: @@ -1209,7 +1209,7 @@ def test_get_entity_type_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1223,7 +1223,7 @@ async def test_get_entity_type_field_headers_async(): # a field header. Set these to a non-empty value. request = entity_type.GetEntityTypeRequest() - 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_entity_type), "__call__") as call: @@ -1241,7 +1241,7 @@ async def test_get_entity_type_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1458,7 +1458,7 @@ def test_create_entity_type_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_entity_type.CreateEntityTypeRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1476,7 +1476,7 @@ def test_create_entity_type_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1490,7 +1490,7 @@ async def test_create_entity_type_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_entity_type.CreateEntityTypeRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1510,7 +1510,7 @@ async def test_create_entity_type_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1741,7 +1741,7 @@ def test_update_entity_type_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_entity_type.UpdateEntityTypeRequest() - request.entity_type.name = "entity_type.name/value" + request.entity_type.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1759,7 +1759,7 @@ def test_update_entity_type_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "entity_type.name=entity_type.name/value", + "entity_type.name=name_value", ) in kw["metadata"] @@ -1773,7 +1773,7 @@ async def test_update_entity_type_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_entity_type.UpdateEntityTypeRequest() - request.entity_type.name = "entity_type.name/value" + request.entity_type.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1793,7 +1793,7 @@ async def test_update_entity_type_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "entity_type.name=entity_type.name/value", + "entity_type.name=name_value", ) in kw["metadata"] @@ -1989,7 +1989,7 @@ def test_delete_entity_type_field_headers(): # a field header. Set these to a non-empty value. request = entity_type.DeleteEntityTypeRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2007,7 +2007,7 @@ def test_delete_entity_type_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2021,7 +2021,7 @@ async def test_delete_entity_type_field_headers_async(): # a field header. Set these to a non-empty value. request = entity_type.DeleteEntityTypeRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2039,7 +2039,7 @@ async def test_delete_entity_type_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_environments.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_environments.py index 7200e87b4fa8..c5dfd5013ed5 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_environments.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_environments.py @@ -748,7 +748,7 @@ def test_list_environments_field_headers(): # a field header. Set these to a non-empty value. request = environment.ListEnvironmentsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -766,7 +766,7 @@ def test_list_environments_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -780,7 +780,7 @@ async def test_list_environments_field_headers_async(): # a field header. Set these to a non-empty value. request = environment.ListEnvironmentsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -800,7 +800,7 @@ async def test_list_environments_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -937,7 +937,7 @@ def test_list_environments_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, environment.Environment) for i in results) @@ -1192,7 +1192,7 @@ def test_get_environment_field_headers(): # a field header. Set these to a non-empty value. request = environment.GetEnvironmentRequest() - 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_environment), "__call__") as call: @@ -1208,7 +1208,7 @@ def test_get_environment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1222,7 +1222,7 @@ async def test_get_environment_field_headers_async(): # a field header. Set these to a non-empty value. request = environment.GetEnvironmentRequest() - 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_environment), "__call__") as call: @@ -1240,7 +1240,7 @@ async def test_get_environment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1425,7 +1425,7 @@ def test_create_environment_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_environment.CreateEnvironmentRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1443,7 +1443,7 @@ def test_create_environment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1457,7 +1457,7 @@ async def test_create_environment_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_environment.CreateEnvironmentRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1477,7 +1477,7 @@ async def test_create_environment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1676,7 +1676,7 @@ def test_update_environment_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_environment.UpdateEnvironmentRequest() - request.environment.name = "environment.name/value" + request.environment.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1694,7 +1694,7 @@ def test_update_environment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "environment.name=environment.name/value", + "environment.name=name_value", ) in kw["metadata"] @@ -1708,7 +1708,7 @@ async def test_update_environment_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_environment.UpdateEnvironmentRequest() - request.environment.name = "environment.name/value" + request.environment.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1728,7 +1728,7 @@ async def test_update_environment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "environment.name=environment.name/value", + "environment.name=name_value", ) in kw["metadata"] @@ -1924,7 +1924,7 @@ def test_delete_environment_field_headers(): # a field header. Set these to a non-empty value. request = environment.DeleteEnvironmentRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1942,7 +1942,7 @@ def test_delete_environment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1956,7 +1956,7 @@ async def test_delete_environment_field_headers_async(): # a field header. Set these to a non-empty value. request = environment.DeleteEnvironmentRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1974,7 +1974,7 @@ async def test_delete_environment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2167,7 +2167,7 @@ def test_lookup_environment_history_field_headers(): # a field header. Set these to a non-empty value. request = environment.LookupEnvironmentHistoryRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2185,7 +2185,7 @@ def test_lookup_environment_history_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2199,7 +2199,7 @@ async def test_lookup_environment_history_field_headers_async(): # a field header. Set these to a non-empty value. request = environment.LookupEnvironmentHistoryRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2219,7 +2219,7 @@ async def test_lookup_environment_history_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2356,7 +2356,7 @@ def test_lookup_environment_history_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, environment.Environment) for i in results) @@ -2603,7 +2603,7 @@ def test_run_continuous_test_field_headers(): # a field header. Set these to a non-empty value. request = environment.RunContinuousTestRequest() - request.environment = "environment/value" + request.environment = "environment_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2621,7 +2621,7 @@ def test_run_continuous_test_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "environment=environment/value", + "environment=environment_value", ) in kw["metadata"] @@ -2635,7 +2635,7 @@ async def test_run_continuous_test_field_headers_async(): # a field header. Set these to a non-empty value. request = environment.RunContinuousTestRequest() - request.environment = "environment/value" + request.environment = "environment_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2655,7 +2655,7 @@ async def test_run_continuous_test_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "environment=environment/value", + "environment=environment_value", ) in kw["metadata"] @@ -2764,7 +2764,7 @@ def test_list_continuous_test_results_field_headers(): # a field header. Set these to a non-empty value. request = environment.ListContinuousTestResultsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2782,7 +2782,7 @@ def test_list_continuous_test_results_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2796,7 +2796,7 @@ async def test_list_continuous_test_results_field_headers_async(): # a field header. Set these to a non-empty value. request = environment.ListContinuousTestResultsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2816,7 +2816,7 @@ async def test_list_continuous_test_results_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2953,7 +2953,7 @@ def test_list_continuous_test_results_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, environment.ContinuousTestResult) for i in results) @@ -3194,7 +3194,7 @@ def test_deploy_flow_field_headers(): # a field header. Set these to a non-empty value. request = environment.DeployFlowRequest() - request.environment = "environment/value" + request.environment = "environment_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.deploy_flow), "__call__") as call: @@ -3210,7 +3210,7 @@ def test_deploy_flow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "environment=environment/value", + "environment=environment_value", ) in kw["metadata"] @@ -3224,7 +3224,7 @@ async def test_deploy_flow_field_headers_async(): # a field header. Set these to a non-empty value. request = environment.DeployFlowRequest() - request.environment = "environment/value" + request.environment = "environment_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.deploy_flow), "__call__") as call: @@ -3242,7 +3242,7 @@ async def test_deploy_flow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "environment=environment/value", + "environment=environment_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_experiments.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_experiments.py index 734de0ff39bf..49ee9734858f 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_experiments.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_experiments.py @@ -727,7 +727,7 @@ def test_list_experiments_field_headers(): # a field header. Set these to a non-empty value. request = experiment.ListExperimentsRequest() - 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_experiments), "__call__") as call: @@ -743,7 +743,7 @@ def test_list_experiments_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -757,7 +757,7 @@ async def test_list_experiments_field_headers_async(): # a field header. Set these to a non-empty value. request = experiment.ListExperimentsRequest() - 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_experiments), "__call__") as call: @@ -775,7 +775,7 @@ async def test_list_experiments_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -906,7 +906,7 @@ def test_list_experiments_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, experiment.Experiment) for i in results) @@ -1163,7 +1163,7 @@ def test_get_experiment_field_headers(): # a field header. Set these to a non-empty value. request = experiment.GetExperimentRequest() - 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_experiment), "__call__") as call: @@ -1179,7 +1179,7 @@ def test_get_experiment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1193,7 +1193,7 @@ async def test_get_experiment_field_headers_async(): # a field header. Set these to a non-empty value. request = experiment.GetExperimentRequest() - 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_experiment), "__call__") as call: @@ -1211,7 +1211,7 @@ async def test_get_experiment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1418,7 +1418,7 @@ def test_create_experiment_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_experiment.CreateExperimentRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1436,7 +1436,7 @@ def test_create_experiment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1450,7 +1450,7 @@ async def test_create_experiment_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_experiment.CreateExperimentRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1470,7 +1470,7 @@ async def test_create_experiment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1691,7 +1691,7 @@ def test_update_experiment_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_experiment.UpdateExperimentRequest() - request.experiment.name = "experiment.name/value" + request.experiment.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1709,7 +1709,7 @@ def test_update_experiment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "experiment.name=experiment.name/value", + "experiment.name=name_value", ) in kw["metadata"] @@ -1723,7 +1723,7 @@ async def test_update_experiment_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_experiment.UpdateExperimentRequest() - request.experiment.name = "experiment.name/value" + request.experiment.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1743,7 +1743,7 @@ async def test_update_experiment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "experiment.name=experiment.name/value", + "experiment.name=name_value", ) in kw["metadata"] @@ -1939,7 +1939,7 @@ def test_delete_experiment_field_headers(): # a field header. Set these to a non-empty value. request = experiment.DeleteExperimentRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1957,7 +1957,7 @@ def test_delete_experiment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1971,7 +1971,7 @@ async def test_delete_experiment_field_headers_async(): # a field header. Set these to a non-empty value. request = experiment.DeleteExperimentRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1989,7 +1989,7 @@ async def test_delete_experiment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2191,7 +2191,7 @@ def test_start_experiment_field_headers(): # a field header. Set these to a non-empty value. request = experiment.StartExperimentRequest() - 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_experiment), "__call__") as call: @@ -2207,7 +2207,7 @@ def test_start_experiment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2221,7 +2221,7 @@ async def test_start_experiment_field_headers_async(): # a field header. Set these to a non-empty value. request = experiment.StartExperimentRequest() - 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_experiment), "__call__") as call: @@ -2239,7 +2239,7 @@ async def test_start_experiment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2439,7 +2439,7 @@ def test_stop_experiment_field_headers(): # a field header. Set these to a non-empty value. request = experiment.StopExperimentRequest() - 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_experiment), "__call__") as call: @@ -2455,7 +2455,7 @@ def test_stop_experiment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2469,7 +2469,7 @@ async def test_stop_experiment_field_headers_async(): # a field header. Set these to a non-empty value. request = experiment.StopExperimentRequest() - 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_experiment), "__call__") as call: @@ -2487,7 +2487,7 @@ async def test_stop_experiment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_flows.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_flows.py index f22377921d46..9c9c07f006c3 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_flows.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_flows.py @@ -727,7 +727,7 @@ def test_create_flow_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_flow.CreateFlowRequest() - 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_flow), "__call__") as call: @@ -743,7 +743,7 @@ def test_create_flow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -757,7 +757,7 @@ async def test_create_flow_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_flow.CreateFlowRequest() - 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_flow), "__call__") as call: @@ -773,7 +773,7 @@ async def test_create_flow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -957,7 +957,7 @@ def test_delete_flow_field_headers(): # a field header. Set these to a non-empty value. request = flow.DeleteFlowRequest() - 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_flow), "__call__") as call: @@ -973,7 +973,7 @@ def test_delete_flow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -987,7 +987,7 @@ async def test_delete_flow_field_headers_async(): # a field header. Set these to a non-empty value. request = flow.DeleteFlowRequest() - 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_flow), "__call__") as call: @@ -1003,7 +1003,7 @@ async def test_delete_flow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1185,7 +1185,7 @@ def test_list_flows_field_headers(): # a field header. Set these to a non-empty value. request = flow.ListFlowsRequest() - 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_flows), "__call__") as call: @@ -1201,7 +1201,7 @@ def test_list_flows_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1215,7 +1215,7 @@ async def test_list_flows_field_headers_async(): # a field header. Set these to a non-empty value. request = flow.ListFlowsRequest() - 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_flows), "__call__") as call: @@ -1233,7 +1233,7 @@ async def test_list_flows_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1364,7 +1364,7 @@ def test_list_flows_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, flow.Flow) for i in results) @@ -1617,7 +1617,7 @@ def test_get_flow_field_headers(): # a field header. Set these to a non-empty value. request = flow.GetFlowRequest() - 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_flow), "__call__") as call: @@ -1633,7 +1633,7 @@ def test_get_flow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1647,7 +1647,7 @@ async def test_get_flow_field_headers_async(): # a field header. Set these to a non-empty value. request = flow.GetFlowRequest() - 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_flow), "__call__") as call: @@ -1663,7 +1663,7 @@ async def test_get_flow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1857,7 +1857,7 @@ def test_update_flow_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_flow.UpdateFlowRequest() - request.flow.name = "flow.name/value" + request.flow.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_flow), "__call__") as call: @@ -1873,7 +1873,7 @@ def test_update_flow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "flow.name=flow.name/value", + "flow.name=name_value", ) in kw["metadata"] @@ -1887,7 +1887,7 @@ async def test_update_flow_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_flow.UpdateFlowRequest() - request.flow.name = "flow.name/value" + request.flow.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_flow), "__call__") as call: @@ -1903,7 +1903,7 @@ async def test_update_flow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "flow.name=flow.name/value", + "flow.name=name_value", ) in kw["metadata"] @@ -2089,7 +2089,7 @@ def test_train_flow_field_headers(): # a field header. Set these to a non-empty value. request = flow.TrainFlowRequest() - 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.train_flow), "__call__") as call: @@ -2105,7 +2105,7 @@ def test_train_flow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2119,7 +2119,7 @@ async def test_train_flow_field_headers_async(): # a field header. Set these to a non-empty value. request = flow.TrainFlowRequest() - 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.train_flow), "__call__") as call: @@ -2137,7 +2137,7 @@ async def test_train_flow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2321,7 +2321,7 @@ def test_validate_flow_field_headers(): # a field header. Set these to a non-empty value. request = flow.ValidateFlowRequest() - 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.validate_flow), "__call__") as call: @@ -2337,7 +2337,7 @@ def test_validate_flow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2351,7 +2351,7 @@ async def test_validate_flow_field_headers_async(): # a field header. Set these to a non-empty value. request = flow.ValidateFlowRequest() - 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.validate_flow), "__call__") as call: @@ -2369,7 +2369,7 @@ async def test_validate_flow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2477,7 +2477,7 @@ def test_get_flow_validation_result_field_headers(): # a field header. Set these to a non-empty value. request = flow.GetFlowValidationResultRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2495,7 +2495,7 @@ def test_get_flow_validation_result_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2509,7 +2509,7 @@ async def test_get_flow_validation_result_field_headers_async(): # a field header. Set these to a non-empty value. request = flow.GetFlowValidationResultRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2529,7 +2529,7 @@ async def test_get_flow_validation_result_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2711,7 +2711,7 @@ def test_import_flow_field_headers(): # a field header. Set these to a non-empty value. request = flow.ImportFlowRequest() - 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.import_flow), "__call__") as call: @@ -2727,7 +2727,7 @@ def test_import_flow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2741,7 +2741,7 @@ async def test_import_flow_field_headers_async(): # a field header. Set these to a non-empty value. request = flow.ImportFlowRequest() - 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.import_flow), "__call__") as call: @@ -2759,7 +2759,7 @@ async def test_import_flow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2855,7 +2855,7 @@ def test_export_flow_field_headers(): # a field header. Set these to a non-empty value. request = flow.ExportFlowRequest() - 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.export_flow), "__call__") as call: @@ -2871,7 +2871,7 @@ def test_export_flow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2885,7 +2885,7 @@ async def test_export_flow_field_headers_async(): # a field header. Set these to a non-empty value. request = flow.ExportFlowRequest() - 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.export_flow), "__call__") as call: @@ -2903,7 +2903,7 @@ async def test_export_flow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_intents.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_intents.py index aa70a8a80756..627b92fc918e 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_intents.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_intents.py @@ -704,7 +704,7 @@ def test_list_intents_field_headers(): # a field header. Set these to a non-empty value. request = intent.ListIntentsRequest() - 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_intents), "__call__") as call: @@ -720,7 +720,7 @@ def test_list_intents_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -734,7 +734,7 @@ async def test_list_intents_field_headers_async(): # a field header. Set these to a non-empty value. request = intent.ListIntentsRequest() - 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_intents), "__call__") as call: @@ -752,7 +752,7 @@ async def test_list_intents_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -883,7 +883,7 @@ def test_list_intents_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, intent.Intent) for i in results) @@ -1140,7 +1140,7 @@ def test_get_intent_field_headers(): # a field header. Set these to a non-empty value. request = intent.GetIntentRequest() - 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_intent), "__call__") as call: @@ -1156,7 +1156,7 @@ def test_get_intent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1170,7 +1170,7 @@ async def test_get_intent_field_headers_async(): # a field header. Set these to a non-empty value. request = intent.GetIntentRequest() - 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_intent), "__call__") as call: @@ -1186,7 +1186,7 @@ async def test_get_intent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1384,7 +1384,7 @@ def test_create_intent_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_intent.CreateIntentRequest() - 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_intent), "__call__") as call: @@ -1400,7 +1400,7 @@ def test_create_intent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1414,7 +1414,7 @@ async def test_create_intent_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_intent.CreateIntentRequest() - 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_intent), "__call__") as call: @@ -1430,7 +1430,7 @@ async def test_create_intent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1638,7 +1638,7 @@ def test_update_intent_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_intent.UpdateIntentRequest() - request.intent.name = "intent.name/value" + request.intent.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_intent), "__call__") as call: @@ -1654,7 +1654,7 @@ def test_update_intent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "intent.name=intent.name/value", + "intent.name=name_value", ) in kw["metadata"] @@ -1668,7 +1668,7 @@ async def test_update_intent_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_intent.UpdateIntentRequest() - request.intent.name = "intent.name/value" + request.intent.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_intent), "__call__") as call: @@ -1684,7 +1684,7 @@ async def test_update_intent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "intent.name=intent.name/value", + "intent.name=name_value", ) in kw["metadata"] @@ -1868,7 +1868,7 @@ def test_delete_intent_field_headers(): # a field header. Set these to a non-empty value. request = intent.DeleteIntentRequest() - 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_intent), "__call__") as call: @@ -1884,7 +1884,7 @@ def test_delete_intent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1898,7 +1898,7 @@ async def test_delete_intent_field_headers_async(): # a field header. Set these to a non-empty value. request = intent.DeleteIntentRequest() - 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_intent), "__call__") as call: @@ -1914,7 +1914,7 @@ async def test_delete_intent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_pages.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_pages.py index aa2e4963349e..8086a8045642 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_pages.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_pages.py @@ -707,7 +707,7 @@ def test_list_pages_field_headers(): # a field header. Set these to a non-empty value. request = page.ListPagesRequest() - 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_pages), "__call__") as call: @@ -723,7 +723,7 @@ def test_list_pages_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -737,7 +737,7 @@ async def test_list_pages_field_headers_async(): # a field header. Set these to a non-empty value. request = page.ListPagesRequest() - 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_pages), "__call__") as call: @@ -755,7 +755,7 @@ async def test_list_pages_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -886,7 +886,7 @@ def test_list_pages_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, page.Page) for i in results) @@ -1135,7 +1135,7 @@ def test_get_page_field_headers(): # a field header. Set these to a non-empty value. request = page.GetPageRequest() - 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_page), "__call__") as call: @@ -1151,7 +1151,7 @@ def test_get_page_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1165,7 +1165,7 @@ async def test_get_page_field_headers_async(): # a field header. Set these to a non-empty value. request = page.GetPageRequest() - 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_page), "__call__") as call: @@ -1181,7 +1181,7 @@ async def test_get_page_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1371,7 +1371,7 @@ def test_create_page_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_page.CreatePageRequest() - 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_page), "__call__") as call: @@ -1387,7 +1387,7 @@ def test_create_page_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1401,7 +1401,7 @@ async def test_create_page_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_page.CreatePageRequest() - 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_page), "__call__") as call: @@ -1417,7 +1417,7 @@ async def test_create_page_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1617,7 +1617,7 @@ def test_update_page_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_page.UpdatePageRequest() - request.page.name = "page.name/value" + request.page.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_page), "__call__") as call: @@ -1633,7 +1633,7 @@ def test_update_page_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "page.name=page.name/value", + "page.name=name_value", ) in kw["metadata"] @@ -1647,7 +1647,7 @@ async def test_update_page_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_page.UpdatePageRequest() - request.page.name = "page.name/value" + request.page.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_page), "__call__") as call: @@ -1663,7 +1663,7 @@ async def test_update_page_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "page.name=page.name/value", + "page.name=name_value", ) in kw["metadata"] @@ -1847,7 +1847,7 @@ def test_delete_page_field_headers(): # a field header. Set these to a non-empty value. request = page.DeletePageRequest() - 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_page), "__call__") as call: @@ -1863,7 +1863,7 @@ def test_delete_page_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1877,7 +1877,7 @@ async def test_delete_page_field_headers_async(): # a field header. Set these to a non-empty value. request = page.DeletePageRequest() - 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_page), "__call__") as call: @@ -1893,7 +1893,7 @@ async def test_delete_page_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_security_settings_service.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_security_settings_service.py index ce62a574a2b7..c8745cbbdf4e 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_security_settings_service.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_security_settings_service.py @@ -831,7 +831,7 @@ def test_create_security_settings_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_security_settings.CreateSecuritySettingsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -849,7 +849,7 @@ def test_create_security_settings_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -863,7 +863,7 @@ async def test_create_security_settings_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_security_settings.CreateSecuritySettingsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -883,7 +883,7 @@ async def test_create_security_settings_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1141,7 +1141,7 @@ def test_get_security_settings_field_headers(): # a field header. Set these to a non-empty value. request = security_settings.GetSecuritySettingsRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1159,7 +1159,7 @@ def test_get_security_settings_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1173,7 +1173,7 @@ async def test_get_security_settings_field_headers_async(): # a field header. Set these to a non-empty value. request = security_settings.GetSecuritySettingsRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1193,7 +1193,7 @@ async def test_get_security_settings_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1433,7 +1433,7 @@ def test_update_security_settings_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_security_settings.UpdateSecuritySettingsRequest() - request.security_settings.name = "security_settings.name/value" + request.security_settings.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1451,7 +1451,7 @@ def test_update_security_settings_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "security_settings.name=security_settings.name/value", + "security_settings.name=name_value", ) in kw["metadata"] @@ -1465,7 +1465,7 @@ async def test_update_security_settings_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_security_settings.UpdateSecuritySettingsRequest() - request.security_settings.name = "security_settings.name/value" + request.security_settings.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1485,7 +1485,7 @@ async def test_update_security_settings_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "security_settings.name=security_settings.name/value", + "security_settings.name=name_value", ) in kw["metadata"] @@ -1698,7 +1698,7 @@ def test_list_security_settings_field_headers(): # a field header. Set these to a non-empty value. request = security_settings.ListSecuritySettingsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1716,7 +1716,7 @@ def test_list_security_settings_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1730,7 +1730,7 @@ async def test_list_security_settings_field_headers_async(): # a field header. Set these to a non-empty value. request = security_settings.ListSecuritySettingsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1750,7 +1750,7 @@ async def test_list_security_settings_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1887,7 +1887,7 @@ def test_list_security_settings_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, security_settings.SecuritySettings) for i in results) @@ -2133,7 +2133,7 @@ def test_delete_security_settings_field_headers(): # a field header. Set these to a non-empty value. request = security_settings.DeleteSecuritySettingsRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2151,7 +2151,7 @@ def test_delete_security_settings_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2165,7 +2165,7 @@ async def test_delete_security_settings_field_headers_async(): # a field header. Set these to a non-empty value. request = security_settings.DeleteSecuritySettingsRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2183,7 +2183,7 @@ async def test_delete_security_settings_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_session_entity_types.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_session_entity_types.py index 529319e870c2..d73fc941d7d7 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_session_entity_types.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_session_entity_types.py @@ -777,7 +777,7 @@ def test_list_session_entity_types_field_headers(): # a field header. Set these to a non-empty value. request = session_entity_type.ListSessionEntityTypesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -795,7 +795,7 @@ def test_list_session_entity_types_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -809,7 +809,7 @@ async def test_list_session_entity_types_field_headers_async(): # a field header. Set these to a non-empty value. request = session_entity_type.ListSessionEntityTypesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -829,7 +829,7 @@ async def test_list_session_entity_types_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -966,7 +966,7 @@ def test_list_session_entity_types_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, session_entity_type.SessionEntityType) for i in results @@ -1234,7 +1234,7 @@ def test_get_session_entity_type_field_headers(): # a field header. Set these to a non-empty value. request = session_entity_type.GetSessionEntityTypeRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1252,7 +1252,7 @@ def test_get_session_entity_type_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1266,7 +1266,7 @@ async def test_get_session_entity_type_field_headers_async(): # a field header. Set these to a non-empty value. request = session_entity_type.GetSessionEntityTypeRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1286,7 +1286,7 @@ async def test_get_session_entity_type_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1491,7 +1491,7 @@ def test_create_session_entity_type_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_session_entity_type.CreateSessionEntityTypeRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1509,7 +1509,7 @@ def test_create_session_entity_type_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1523,7 +1523,7 @@ async def test_create_session_entity_type_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_session_entity_type.CreateSessionEntityTypeRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1543,7 +1543,7 @@ async def test_create_session_entity_type_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1766,7 +1766,7 @@ def test_update_session_entity_type_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_session_entity_type.UpdateSessionEntityTypeRequest() - request.session_entity_type.name = "session_entity_type.name/value" + request.session_entity_type.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1784,7 +1784,7 @@ def test_update_session_entity_type_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "session_entity_type.name=session_entity_type.name/value", + "session_entity_type.name=name_value", ) in kw["metadata"] @@ -1798,7 +1798,7 @@ async def test_update_session_entity_type_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_session_entity_type.UpdateSessionEntityTypeRequest() - request.session_entity_type.name = "session_entity_type.name/value" + request.session_entity_type.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1818,7 +1818,7 @@ async def test_update_session_entity_type_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "session_entity_type.name=session_entity_type.name/value", + "session_entity_type.name=name_value", ) in kw["metadata"] @@ -2023,7 +2023,7 @@ def test_delete_session_entity_type_field_headers(): # a field header. Set these to a non-empty value. request = session_entity_type.DeleteSessionEntityTypeRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2041,7 +2041,7 @@ def test_delete_session_entity_type_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2055,7 +2055,7 @@ async def test_delete_session_entity_type_field_headers_async(): # a field header. Set these to a non-empty value. request = session_entity_type.DeleteSessionEntityTypeRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2073,7 +2073,7 @@ async def test_delete_session_entity_type_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_sessions.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_sessions.py index dcdd69fc9630..30b7fde9916c 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_sessions.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_sessions.py @@ -729,7 +729,7 @@ def test_detect_intent_field_headers(): # a field header. Set these to a non-empty value. request = session.DetectIntentRequest() - request.session = "session/value" + request.session = "session_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.detect_intent), "__call__") as call: @@ -745,7 +745,7 @@ def test_detect_intent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "session=session/value", + "session=session_value", ) in kw["metadata"] @@ -759,7 +759,7 @@ async def test_detect_intent_field_headers_async(): # a field header. Set these to a non-empty value. request = session.DetectIntentRequest() - request.session = "session/value" + request.session = "session_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.detect_intent), "__call__") as call: @@ -777,7 +777,7 @@ async def test_detect_intent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "session=session/value", + "session=session_value", ) in kw["metadata"] @@ -951,7 +951,7 @@ def test_match_intent_field_headers(): # a field header. Set these to a non-empty value. request = session.MatchIntentRequest() - request.session = "session/value" + request.session = "session_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.match_intent), "__call__") as call: @@ -967,7 +967,7 @@ def test_match_intent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "session=session/value", + "session=session_value", ) in kw["metadata"] @@ -981,7 +981,7 @@ async def test_match_intent_field_headers_async(): # a field header. Set these to a non-empty value. request = session.MatchIntentRequest() - request.session = "session/value" + request.session = "session_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.match_intent), "__call__") as call: @@ -999,7 +999,7 @@ async def test_match_intent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "session=session/value", + "session=session_value", ) in kw["metadata"] @@ -1105,7 +1105,7 @@ def test_fulfill_intent_field_headers(): # a field header. Set these to a non-empty value. request = session.FulfillIntentRequest() - request.match_intent_request.session = "match_intent_request.session/value" + request.match_intent_request.session = "session_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.fulfill_intent), "__call__") as call: @@ -1121,7 +1121,7 @@ def test_fulfill_intent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "match_intent_request.session=match_intent_request.session/value", + "match_intent_request.session=session_value", ) in kw["metadata"] @@ -1135,7 +1135,7 @@ async def test_fulfill_intent_field_headers_async(): # a field header. Set these to a non-empty value. request = session.FulfillIntentRequest() - request.match_intent_request.session = "match_intent_request.session/value" + request.match_intent_request.session = "session_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.fulfill_intent), "__call__") as call: @@ -1153,7 +1153,7 @@ async def test_fulfill_intent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "match_intent_request.session=match_intent_request.session/value", + "match_intent_request.session=session_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_test_cases.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_test_cases.py index d451354c66f0..8b897c0bf879 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_test_cases.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_test_cases.py @@ -738,7 +738,7 @@ def test_list_test_cases_field_headers(): # a field header. Set these to a non-empty value. request = test_case.ListTestCasesRequest() - 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_test_cases), "__call__") as call: @@ -754,7 +754,7 @@ def test_list_test_cases_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -768,7 +768,7 @@ async def test_list_test_cases_field_headers_async(): # a field header. Set these to a non-empty value. request = test_case.ListTestCasesRequest() - 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_test_cases), "__call__") as call: @@ -786,7 +786,7 @@ async def test_list_test_cases_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -917,7 +917,7 @@ def test_list_test_cases_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, test_case.TestCase) for i in results) @@ -1156,7 +1156,7 @@ def test_batch_delete_test_cases_field_headers(): # a field header. Set these to a non-empty value. request = test_case.BatchDeleteTestCasesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1174,7 +1174,7 @@ def test_batch_delete_test_cases_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1188,7 +1188,7 @@ async def test_batch_delete_test_cases_field_headers_async(): # a field header. Set these to a non-empty value. request = test_case.BatchDeleteTestCasesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1206,7 +1206,7 @@ async def test_batch_delete_test_cases_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1404,7 +1404,7 @@ def test_get_test_case_field_headers(): # a field header. Set these to a non-empty value. request = test_case.GetTestCaseRequest() - 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_test_case), "__call__") as call: @@ -1420,7 +1420,7 @@ def test_get_test_case_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1434,7 +1434,7 @@ async def test_get_test_case_field_headers_async(): # a field header. Set these to a non-empty value. request = test_case.GetTestCaseRequest() - 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_test_case), "__call__") as call: @@ -1450,7 +1450,7 @@ async def test_get_test_case_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1644,7 +1644,7 @@ def test_create_test_case_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_test_case.CreateTestCaseRequest() - 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_test_case), "__call__") as call: @@ -1660,7 +1660,7 @@ def test_create_test_case_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1674,7 +1674,7 @@ async def test_create_test_case_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_test_case.CreateTestCaseRequest() - 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_test_case), "__call__") as call: @@ -1692,7 +1692,7 @@ async def test_create_test_case_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1898,7 +1898,7 @@ def test_update_test_case_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_test_case.UpdateTestCaseRequest() - request.test_case.name = "test_case.name/value" + request.test_case.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_test_case), "__call__") as call: @@ -1914,7 +1914,7 @@ def test_update_test_case_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "test_case.name=test_case.name/value", + "test_case.name=name_value", ) in kw["metadata"] @@ -1928,7 +1928,7 @@ async def test_update_test_case_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_test_case.UpdateTestCaseRequest() - request.test_case.name = "test_case.name/value" + request.test_case.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_test_case), "__call__") as call: @@ -1946,7 +1946,7 @@ async def test_update_test_case_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "test_case.name=test_case.name/value", + "test_case.name=name_value", ) in kw["metadata"] @@ -2134,7 +2134,7 @@ def test_run_test_case_field_headers(): # a field header. Set these to a non-empty value. request = test_case.RunTestCaseRequest() - 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.run_test_case), "__call__") as call: @@ -2150,7 +2150,7 @@ def test_run_test_case_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2164,7 +2164,7 @@ async def test_run_test_case_field_headers_async(): # a field header. Set these to a non-empty value. request = test_case.RunTestCaseRequest() - 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.run_test_case), "__call__") as call: @@ -2182,7 +2182,7 @@ async def test_run_test_case_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2284,7 +2284,7 @@ def test_batch_run_test_cases_field_headers(): # a field header. Set these to a non-empty value. request = test_case.BatchRunTestCasesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2302,7 +2302,7 @@ def test_batch_run_test_cases_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2316,7 +2316,7 @@ async def test_batch_run_test_cases_field_headers_async(): # a field header. Set these to a non-empty value. request = test_case.BatchRunTestCasesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2336,7 +2336,7 @@ async def test_batch_run_test_cases_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2447,7 +2447,7 @@ def test_calculate_coverage_field_headers(): # a field header. Set these to a non-empty value. request = test_case.CalculateCoverageRequest() - request.agent = "agent/value" + request.agent = "agent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2465,7 +2465,7 @@ def test_calculate_coverage_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "agent=agent/value", + "agent=agent_value", ) in kw["metadata"] @@ -2479,7 +2479,7 @@ async def test_calculate_coverage_field_headers_async(): # a field header. Set these to a non-empty value. request = test_case.CalculateCoverageRequest() - request.agent = "agent/value" + request.agent = "agent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2499,7 +2499,7 @@ async def test_calculate_coverage_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "agent=agent/value", + "agent=agent_value", ) in kw["metadata"] @@ -2601,7 +2601,7 @@ def test_import_test_cases_field_headers(): # a field header. Set these to a non-empty value. request = test_case.ImportTestCasesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2619,7 +2619,7 @@ def test_import_test_cases_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2633,7 +2633,7 @@ async def test_import_test_cases_field_headers_async(): # a field header. Set these to a non-empty value. request = test_case.ImportTestCasesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2653,7 +2653,7 @@ async def test_import_test_cases_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2755,7 +2755,7 @@ def test_export_test_cases_field_headers(): # a field header. Set these to a non-empty value. request = test_case.ExportTestCasesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2773,7 +2773,7 @@ def test_export_test_cases_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2787,7 +2787,7 @@ async def test_export_test_cases_field_headers_async(): # a field header. Set these to a non-empty value. request = test_case.ExportTestCasesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2807,7 +2807,7 @@ async def test_export_test_cases_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2915,7 +2915,7 @@ def test_list_test_case_results_field_headers(): # a field header. Set these to a non-empty value. request = test_case.ListTestCaseResultsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2933,7 +2933,7 @@ def test_list_test_case_results_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2947,7 +2947,7 @@ async def test_list_test_case_results_field_headers_async(): # a field header. Set these to a non-empty value. request = test_case.ListTestCaseResultsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2967,7 +2967,7 @@ async def test_list_test_case_results_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3104,7 +3104,7 @@ def test_list_test_case_results_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, test_case.TestCaseResult) for i in results) @@ -3365,7 +3365,7 @@ def test_get_test_case_result_field_headers(): # a field header. Set these to a non-empty value. request = test_case.GetTestCaseResultRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3383,7 +3383,7 @@ def test_get_test_case_result_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3397,7 +3397,7 @@ async def test_get_test_case_result_field_headers_async(): # a field header. Set these to a non-empty value. request = test_case.GetTestCaseResultRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3417,7 +3417,7 @@ async def test_get_test_case_result_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_transition_route_groups.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_transition_route_groups.py index 21f5535b44b1..bb10484758ec 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_transition_route_groups.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_transition_route_groups.py @@ -788,7 +788,7 @@ def test_list_transition_route_groups_field_headers(): # a field header. Set these to a non-empty value. request = transition_route_group.ListTransitionRouteGroupsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -806,7 +806,7 @@ def test_list_transition_route_groups_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -820,7 +820,7 @@ async def test_list_transition_route_groups_field_headers_async(): # a field header. Set these to a non-empty value. request = transition_route_group.ListTransitionRouteGroupsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -840,7 +840,7 @@ async def test_list_transition_route_groups_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -977,7 +977,7 @@ def test_list_transition_route_groups_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, transition_route_group.TransitionRouteGroup) for i in results @@ -1240,7 +1240,7 @@ def test_get_transition_route_group_field_headers(): # a field header. Set these to a non-empty value. request = transition_route_group.GetTransitionRouteGroupRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1258,7 +1258,7 @@ def test_get_transition_route_group_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1272,7 +1272,7 @@ async def test_get_transition_route_group_field_headers_async(): # a field header. Set these to a non-empty value. request = transition_route_group.GetTransitionRouteGroupRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1292,7 +1292,7 @@ async def test_get_transition_route_group_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1497,7 +1497,7 @@ def test_create_transition_route_group_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_transition_route_group.CreateTransitionRouteGroupRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1515,7 +1515,7 @@ def test_create_transition_route_group_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1529,7 +1529,7 @@ async def test_create_transition_route_group_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_transition_route_group.CreateTransitionRouteGroupRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1549,7 +1549,7 @@ async def test_create_transition_route_group_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1772,7 +1772,7 @@ def test_update_transition_route_group_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_transition_route_group.UpdateTransitionRouteGroupRequest() - request.transition_route_group.name = "transition_route_group.name/value" + request.transition_route_group.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1790,7 +1790,7 @@ def test_update_transition_route_group_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "transition_route_group.name=transition_route_group.name/value", + "transition_route_group.name=name_value", ) in kw["metadata"] @@ -1804,7 +1804,7 @@ async def test_update_transition_route_group_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_transition_route_group.UpdateTransitionRouteGroupRequest() - request.transition_route_group.name = "transition_route_group.name/value" + request.transition_route_group.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1824,7 +1824,7 @@ async def test_update_transition_route_group_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "transition_route_group.name=transition_route_group.name/value", + "transition_route_group.name=name_value", ) in kw["metadata"] @@ -2029,7 +2029,7 @@ def test_delete_transition_route_group_field_headers(): # a field header. Set these to a non-empty value. request = transition_route_group.DeleteTransitionRouteGroupRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2047,7 +2047,7 @@ def test_delete_transition_route_group_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2061,7 +2061,7 @@ async def test_delete_transition_route_group_field_headers_async(): # a field header. Set these to a non-empty value. request = transition_route_group.DeleteTransitionRouteGroupRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2079,7 +2079,7 @@ async def test_delete_transition_route_group_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_versions.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_versions.py index 01bcafe54f0e..cdf255960536 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_versions.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_versions.py @@ -721,7 +721,7 @@ def test_list_versions_field_headers(): # a field header. Set these to a non-empty value. request = version.ListVersionsRequest() - 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_versions), "__call__") as call: @@ -737,7 +737,7 @@ def test_list_versions_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -751,7 +751,7 @@ async def test_list_versions_field_headers_async(): # a field header. Set these to a non-empty value. request = version.ListVersionsRequest() - 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_versions), "__call__") as call: @@ -769,7 +769,7 @@ async def test_list_versions_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -900,7 +900,7 @@ def test_list_versions_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, version.Version) for i in results) @@ -1153,7 +1153,7 @@ def test_get_version_field_headers(): # a field header. Set these to a non-empty value. request = version.GetVersionRequest() - 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_version), "__call__") as call: @@ -1169,7 +1169,7 @@ def test_get_version_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1183,7 +1183,7 @@ async def test_get_version_field_headers_async(): # a field header. Set these to a non-empty value. request = version.GetVersionRequest() - 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_version), "__call__") as call: @@ -1199,7 +1199,7 @@ async def test_get_version_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1375,7 +1375,7 @@ def test_create_version_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_version.CreateVersionRequest() - 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_version), "__call__") as call: @@ -1391,7 +1391,7 @@ def test_create_version_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1405,7 +1405,7 @@ async def test_create_version_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_version.CreateVersionRequest() - 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_version), "__call__") as call: @@ -1423,7 +1423,7 @@ async def test_create_version_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1629,7 +1629,7 @@ def test_update_version_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_version.UpdateVersionRequest() - request.version.name = "version.name/value" + request.version.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_version), "__call__") as call: @@ -1645,7 +1645,7 @@ def test_update_version_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "version.name=version.name/value", + "version.name=name_value", ) in kw["metadata"] @@ -1659,7 +1659,7 @@ async def test_update_version_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_version.UpdateVersionRequest() - request.version.name = "version.name/value" + request.version.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_version), "__call__") as call: @@ -1677,7 +1677,7 @@ async def test_update_version_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "version.name=version.name/value", + "version.name=name_value", ) in kw["metadata"] @@ -1863,7 +1863,7 @@ def test_delete_version_field_headers(): # a field header. Set these to a non-empty value. request = version.DeleteVersionRequest() - 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_version), "__call__") as call: @@ -1879,7 +1879,7 @@ def test_delete_version_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1893,7 +1893,7 @@ async def test_delete_version_field_headers_async(): # a field header. Set these to a non-empty value. request = version.DeleteVersionRequest() - 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_version), "__call__") as call: @@ -1909,7 +1909,7 @@ async def test_delete_version_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2085,7 +2085,7 @@ def test_load_version_field_headers(): # a field header. Set these to a non-empty value. request = version.LoadVersionRequest() - 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.load_version), "__call__") as call: @@ -2101,7 +2101,7 @@ def test_load_version_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2115,7 +2115,7 @@ async def test_load_version_field_headers_async(): # a field header. Set these to a non-empty value. request = version.LoadVersionRequest() - 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.load_version), "__call__") as call: @@ -2133,7 +2133,7 @@ async def test_load_version_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2321,7 +2321,7 @@ def test_compare_versions_field_headers(): # a field header. Set these to a non-empty value. request = version.CompareVersionsRequest() - request.base_version = "base_version/value" + request.base_version = "base_version_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.compare_versions), "__call__") as call: @@ -2337,7 +2337,7 @@ def test_compare_versions_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "base_version=base_version/value", + "base_version=base_version_value", ) in kw["metadata"] @@ -2351,7 +2351,7 @@ async def test_compare_versions_field_headers_async(): # a field header. Set these to a non-empty value. request = version.CompareVersionsRequest() - request.base_version = "base_version/value" + request.base_version = "base_version_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.compare_versions), "__call__") as call: @@ -2369,7 +2369,7 @@ async def test_compare_versions_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "base_version=base_version/value", + "base_version=base_version_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_webhooks.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_webhooks.py index bba838cefe60..d135a78c3100 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_webhooks.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3/test_webhooks.py @@ -714,7 +714,7 @@ def test_list_webhooks_field_headers(): # a field header. Set these to a non-empty value. request = webhook.ListWebhooksRequest() - 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_webhooks), "__call__") as call: @@ -730,7 +730,7 @@ def test_list_webhooks_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -744,7 +744,7 @@ async def test_list_webhooks_field_headers_async(): # a field header. Set these to a non-empty value. request = webhook.ListWebhooksRequest() - 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_webhooks), "__call__") as call: @@ -762,7 +762,7 @@ async def test_list_webhooks_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -893,7 +893,7 @@ def test_list_webhooks_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, webhook.Webhook) for i in results) @@ -1143,7 +1143,7 @@ def test_get_webhook_field_headers(): # a field header. Set these to a non-empty value. request = webhook.GetWebhookRequest() - 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_webhook), "__call__") as call: @@ -1159,7 +1159,7 @@ def test_get_webhook_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1173,7 +1173,7 @@ async def test_get_webhook_field_headers_async(): # a field header. Set these to a non-empty value. request = webhook.GetWebhookRequest() - 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_webhook), "__call__") as call: @@ -1189,7 +1189,7 @@ async def test_get_webhook_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1380,7 +1380,7 @@ def test_create_webhook_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_webhook.CreateWebhookRequest() - 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_webhook), "__call__") as call: @@ -1396,7 +1396,7 @@ def test_create_webhook_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1410,7 +1410,7 @@ async def test_create_webhook_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_webhook.CreateWebhookRequest() - 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_webhook), "__call__") as call: @@ -1428,7 +1428,7 @@ async def test_create_webhook_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1631,7 +1631,7 @@ def test_update_webhook_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_webhook.UpdateWebhookRequest() - request.webhook.name = "webhook.name/value" + request.webhook.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_webhook), "__call__") as call: @@ -1647,7 +1647,7 @@ def test_update_webhook_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "webhook.name=webhook.name/value", + "webhook.name=name_value", ) in kw["metadata"] @@ -1661,7 +1661,7 @@ async def test_update_webhook_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_webhook.UpdateWebhookRequest() - request.webhook.name = "webhook.name/value" + request.webhook.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_webhook), "__call__") as call: @@ -1679,7 +1679,7 @@ async def test_update_webhook_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "webhook.name=webhook.name/value", + "webhook.name=name_value", ) in kw["metadata"] @@ -1865,7 +1865,7 @@ def test_delete_webhook_field_headers(): # a field header. Set these to a non-empty value. request = webhook.DeleteWebhookRequest() - 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_webhook), "__call__") as call: @@ -1881,7 +1881,7 @@ def test_delete_webhook_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1895,7 +1895,7 @@ async def test_delete_webhook_field_headers_async(): # a field header. Set these to a non-empty value. request = webhook.DeleteWebhookRequest() - 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_webhook), "__call__") as call: @@ -1911,7 +1911,7 @@ async def test_delete_webhook_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_agents.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_agents.py index e5d3e895e5f8..a2d1735e57f8 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_agents.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_agents.py @@ -712,7 +712,7 @@ def test_list_agents_field_headers(): # a field header. Set these to a non-empty value. request = agent.ListAgentsRequest() - 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_agents), "__call__") as call: @@ -728,7 +728,7 @@ def test_list_agents_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -742,7 +742,7 @@ async def test_list_agents_field_headers_async(): # a field header. Set these to a non-empty value. request = agent.ListAgentsRequest() - 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_agents), "__call__") as call: @@ -760,7 +760,7 @@ async def test_list_agents_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -891,7 +891,7 @@ def test_list_agents_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, agent.Agent) for i in results) @@ -1176,7 +1176,7 @@ def test_get_agent_field_headers(): # a field header. Set these to a non-empty value. request = agent.GetAgentRequest() - 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_agent), "__call__") as call: @@ -1192,7 +1192,7 @@ def test_get_agent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1206,7 +1206,7 @@ async def test_get_agent_field_headers_async(): # a field header. Set these to a non-empty value. request = agent.GetAgentRequest() - 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_agent), "__call__") as call: @@ -1222,7 +1222,7 @@ async def test_get_agent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1448,7 +1448,7 @@ def test_create_agent_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_agent.CreateAgentRequest() - 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_agent), "__call__") as call: @@ -1464,7 +1464,7 @@ def test_create_agent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1478,7 +1478,7 @@ async def test_create_agent_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_agent.CreateAgentRequest() - 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_agent), "__call__") as call: @@ -1494,7 +1494,7 @@ async def test_create_agent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1730,7 +1730,7 @@ def test_update_agent_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_agent.UpdateAgentRequest() - request.agent.name = "agent.name/value" + request.agent.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_agent), "__call__") as call: @@ -1746,7 +1746,7 @@ def test_update_agent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "agent.name=agent.name/value", + "agent.name=name_value", ) in kw["metadata"] @@ -1760,7 +1760,7 @@ async def test_update_agent_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_agent.UpdateAgentRequest() - request.agent.name = "agent.name/value" + request.agent.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_agent), "__call__") as call: @@ -1776,7 +1776,7 @@ async def test_update_agent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "agent.name=agent.name/value", + "agent.name=name_value", ) in kw["metadata"] @@ -1960,7 +1960,7 @@ def test_delete_agent_field_headers(): # a field header. Set these to a non-empty value. request = agent.DeleteAgentRequest() - 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_agent), "__call__") as call: @@ -1976,7 +1976,7 @@ def test_delete_agent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1990,7 +1990,7 @@ async def test_delete_agent_field_headers_async(): # a field header. Set these to a non-empty value. request = agent.DeleteAgentRequest() - 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_agent), "__call__") as call: @@ -2006,7 +2006,7 @@ async def test_delete_agent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2182,7 +2182,7 @@ def test_export_agent_field_headers(): # a field header. Set these to a non-empty value. request = agent.ExportAgentRequest() - 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.export_agent), "__call__") as call: @@ -2198,7 +2198,7 @@ def test_export_agent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2212,7 +2212,7 @@ async def test_export_agent_field_headers_async(): # a field header. Set these to a non-empty value. request = agent.ExportAgentRequest() - 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.export_agent), "__call__") as call: @@ -2230,7 +2230,7 @@ async def test_export_agent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2326,7 +2326,7 @@ def test_restore_agent_field_headers(): # a field header. Set these to a non-empty value. request = agent.RestoreAgentRequest() - 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.restore_agent), "__call__") as call: @@ -2342,7 +2342,7 @@ def test_restore_agent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2356,7 +2356,7 @@ async def test_restore_agent_field_headers_async(): # a field header. Set these to a non-empty value. request = agent.RestoreAgentRequest() - 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.restore_agent), "__call__") as call: @@ -2374,7 +2374,7 @@ async def test_restore_agent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2476,7 +2476,7 @@ def test_validate_agent_field_headers(): # a field header. Set these to a non-empty value. request = agent.ValidateAgentRequest() - 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.validate_agent), "__call__") as call: @@ -2492,7 +2492,7 @@ def test_validate_agent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2506,7 +2506,7 @@ async def test_validate_agent_field_headers_async(): # a field header. Set these to a non-empty value. request = agent.ValidateAgentRequest() - 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.validate_agent), "__call__") as call: @@ -2524,7 +2524,7 @@ async def test_validate_agent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2632,7 +2632,7 @@ def test_get_agent_validation_result_field_headers(): # a field header. Set these to a non-empty value. request = agent.GetAgentValidationResultRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2650,7 +2650,7 @@ def test_get_agent_validation_result_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2664,7 +2664,7 @@ async def test_get_agent_validation_result_field_headers_async(): # a field header. Set these to a non-empty value. request = agent.GetAgentValidationResultRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2684,7 +2684,7 @@ async def test_get_agent_validation_result_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_changelogs.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_changelogs.py index d194efcc5d1c..e8504693dc7c 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_changelogs.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_changelogs.py @@ -724,7 +724,7 @@ def test_list_changelogs_field_headers(): # a field header. Set these to a non-empty value. request = changelog.ListChangelogsRequest() - 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_changelogs), "__call__") as call: @@ -740,7 +740,7 @@ def test_list_changelogs_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -754,7 +754,7 @@ async def test_list_changelogs_field_headers_async(): # a field header. Set these to a non-empty value. request = changelog.ListChangelogsRequest() - 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_changelogs), "__call__") as call: @@ -772,7 +772,7 @@ async def test_list_changelogs_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -903,7 +903,7 @@ def test_list_changelogs_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, changelog.Changelog) for i in results) @@ -1164,7 +1164,7 @@ def test_get_changelog_field_headers(): # a field header. Set these to a non-empty value. request = changelog.GetChangelogRequest() - 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_changelog), "__call__") as call: @@ -1180,7 +1180,7 @@ def test_get_changelog_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1194,7 +1194,7 @@ async def test_get_changelog_field_headers_async(): # a field header. Set these to a non-empty value. request = changelog.GetChangelogRequest() - 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_changelog), "__call__") as call: @@ -1210,7 +1210,7 @@ async def test_get_changelog_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_deployments.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_deployments.py index 6492f3be4cde..12653ba616d0 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_deployments.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_deployments.py @@ -726,7 +726,7 @@ def test_list_deployments_field_headers(): # a field header. Set these to a non-empty value. request = deployment.ListDeploymentsRequest() - 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_deployments), "__call__") as call: @@ -742,7 +742,7 @@ def test_list_deployments_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -756,7 +756,7 @@ async def test_list_deployments_field_headers_async(): # a field header. Set these to a non-empty value. request = deployment.ListDeploymentsRequest() - 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_deployments), "__call__") as call: @@ -774,7 +774,7 @@ async def test_list_deployments_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -905,7 +905,7 @@ def test_list_deployments_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, deployment.Deployment) for i in results) @@ -1154,7 +1154,7 @@ def test_get_deployment_field_headers(): # a field header. Set these to a non-empty value. request = deployment.GetDeploymentRequest() - 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_deployment), "__call__") as call: @@ -1170,7 +1170,7 @@ def test_get_deployment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1184,7 +1184,7 @@ async def test_get_deployment_field_headers_async(): # a field header. Set these to a non-empty value. request = deployment.GetDeploymentRequest() - 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_deployment), "__call__") as call: @@ -1202,7 +1202,7 @@ async def test_get_deployment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_entity_types.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_entity_types.py index 148ea6911514..1f7c14f96a1a 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_entity_types.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_entity_types.py @@ -733,7 +733,7 @@ def test_list_entity_types_field_headers(): # a field header. Set these to a non-empty value. request = entity_type.ListEntityTypesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -751,7 +751,7 @@ def test_list_entity_types_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -765,7 +765,7 @@ async def test_list_entity_types_field_headers_async(): # a field header. Set these to a non-empty value. request = entity_type.ListEntityTypesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -785,7 +785,7 @@ async def test_list_entity_types_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -922,7 +922,7 @@ def test_list_entity_types_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, entity_type.EntityType) for i in results) @@ -1195,7 +1195,7 @@ def test_get_entity_type_field_headers(): # a field header. Set these to a non-empty value. request = entity_type.GetEntityTypeRequest() - 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_entity_type), "__call__") as call: @@ -1211,7 +1211,7 @@ def test_get_entity_type_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1225,7 +1225,7 @@ async def test_get_entity_type_field_headers_async(): # a field header. Set these to a non-empty value. request = entity_type.GetEntityTypeRequest() - 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_entity_type), "__call__") as call: @@ -1243,7 +1243,7 @@ async def test_get_entity_type_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1460,7 +1460,7 @@ def test_create_entity_type_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_entity_type.CreateEntityTypeRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1478,7 +1478,7 @@ def test_create_entity_type_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1492,7 +1492,7 @@ async def test_create_entity_type_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_entity_type.CreateEntityTypeRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1512,7 +1512,7 @@ async def test_create_entity_type_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1743,7 +1743,7 @@ def test_update_entity_type_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_entity_type.UpdateEntityTypeRequest() - request.entity_type.name = "entity_type.name/value" + request.entity_type.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1761,7 +1761,7 @@ def test_update_entity_type_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "entity_type.name=entity_type.name/value", + "entity_type.name=name_value", ) in kw["metadata"] @@ -1775,7 +1775,7 @@ async def test_update_entity_type_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_entity_type.UpdateEntityTypeRequest() - request.entity_type.name = "entity_type.name/value" + request.entity_type.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1795,7 +1795,7 @@ async def test_update_entity_type_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "entity_type.name=entity_type.name/value", + "entity_type.name=name_value", ) in kw["metadata"] @@ -1991,7 +1991,7 @@ def test_delete_entity_type_field_headers(): # a field header. Set these to a non-empty value. request = entity_type.DeleteEntityTypeRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2009,7 +2009,7 @@ def test_delete_entity_type_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2023,7 +2023,7 @@ async def test_delete_entity_type_field_headers_async(): # a field header. Set these to a non-empty value. request = entity_type.DeleteEntityTypeRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2041,7 +2041,7 @@ async def test_delete_entity_type_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_environments.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_environments.py index 3c33bcc15bdd..74605d994278 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_environments.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_environments.py @@ -750,7 +750,7 @@ def test_list_environments_field_headers(): # a field header. Set these to a non-empty value. request = environment.ListEnvironmentsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -768,7 +768,7 @@ def test_list_environments_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -782,7 +782,7 @@ async def test_list_environments_field_headers_async(): # a field header. Set these to a non-empty value. request = environment.ListEnvironmentsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -802,7 +802,7 @@ async def test_list_environments_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -939,7 +939,7 @@ def test_list_environments_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, environment.Environment) for i in results) @@ -1194,7 +1194,7 @@ def test_get_environment_field_headers(): # a field header. Set these to a non-empty value. request = environment.GetEnvironmentRequest() - 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_environment), "__call__") as call: @@ -1210,7 +1210,7 @@ def test_get_environment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1224,7 +1224,7 @@ async def test_get_environment_field_headers_async(): # a field header. Set these to a non-empty value. request = environment.GetEnvironmentRequest() - 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_environment), "__call__") as call: @@ -1242,7 +1242,7 @@ async def test_get_environment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1427,7 +1427,7 @@ def test_create_environment_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_environment.CreateEnvironmentRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1445,7 +1445,7 @@ def test_create_environment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1459,7 +1459,7 @@ async def test_create_environment_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_environment.CreateEnvironmentRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1479,7 +1479,7 @@ async def test_create_environment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1678,7 +1678,7 @@ def test_update_environment_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_environment.UpdateEnvironmentRequest() - request.environment.name = "environment.name/value" + request.environment.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1696,7 +1696,7 @@ def test_update_environment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "environment.name=environment.name/value", + "environment.name=name_value", ) in kw["metadata"] @@ -1710,7 +1710,7 @@ async def test_update_environment_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_environment.UpdateEnvironmentRequest() - request.environment.name = "environment.name/value" + request.environment.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1730,7 +1730,7 @@ async def test_update_environment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "environment.name=environment.name/value", + "environment.name=name_value", ) in kw["metadata"] @@ -1926,7 +1926,7 @@ def test_delete_environment_field_headers(): # a field header. Set these to a non-empty value. request = environment.DeleteEnvironmentRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1944,7 +1944,7 @@ def test_delete_environment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1958,7 +1958,7 @@ async def test_delete_environment_field_headers_async(): # a field header. Set these to a non-empty value. request = environment.DeleteEnvironmentRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1976,7 +1976,7 @@ async def test_delete_environment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2169,7 +2169,7 @@ def test_lookup_environment_history_field_headers(): # a field header. Set these to a non-empty value. request = environment.LookupEnvironmentHistoryRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2187,7 +2187,7 @@ def test_lookup_environment_history_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2201,7 +2201,7 @@ async def test_lookup_environment_history_field_headers_async(): # a field header. Set these to a non-empty value. request = environment.LookupEnvironmentHistoryRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2221,7 +2221,7 @@ async def test_lookup_environment_history_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2358,7 +2358,7 @@ def test_lookup_environment_history_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, environment.Environment) for i in results) @@ -2605,7 +2605,7 @@ def test_run_continuous_test_field_headers(): # a field header. Set these to a non-empty value. request = environment.RunContinuousTestRequest() - request.environment = "environment/value" + request.environment = "environment_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2623,7 +2623,7 @@ def test_run_continuous_test_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "environment=environment/value", + "environment=environment_value", ) in kw["metadata"] @@ -2637,7 +2637,7 @@ async def test_run_continuous_test_field_headers_async(): # a field header. Set these to a non-empty value. request = environment.RunContinuousTestRequest() - request.environment = "environment/value" + request.environment = "environment_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2657,7 +2657,7 @@ async def test_run_continuous_test_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "environment=environment/value", + "environment=environment_value", ) in kw["metadata"] @@ -2766,7 +2766,7 @@ def test_list_continuous_test_results_field_headers(): # a field header. Set these to a non-empty value. request = environment.ListContinuousTestResultsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2784,7 +2784,7 @@ def test_list_continuous_test_results_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2798,7 +2798,7 @@ async def test_list_continuous_test_results_field_headers_async(): # a field header. Set these to a non-empty value. request = environment.ListContinuousTestResultsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2818,7 +2818,7 @@ async def test_list_continuous_test_results_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2955,7 +2955,7 @@ def test_list_continuous_test_results_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, environment.ContinuousTestResult) for i in results) @@ -3196,7 +3196,7 @@ def test_deploy_flow_field_headers(): # a field header. Set these to a non-empty value. request = environment.DeployFlowRequest() - request.environment = "environment/value" + request.environment = "environment_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.deploy_flow), "__call__") as call: @@ -3212,7 +3212,7 @@ def test_deploy_flow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "environment=environment/value", + "environment=environment_value", ) in kw["metadata"] @@ -3226,7 +3226,7 @@ async def test_deploy_flow_field_headers_async(): # a field header. Set these to a non-empty value. request = environment.DeployFlowRequest() - request.environment = "environment/value" + request.environment = "environment_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.deploy_flow), "__call__") as call: @@ -3244,7 +3244,7 @@ async def test_deploy_flow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "environment=environment/value", + "environment=environment_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_experiments.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_experiments.py index fe7a74b5eca4..52db56771d6c 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_experiments.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_experiments.py @@ -729,7 +729,7 @@ def test_list_experiments_field_headers(): # a field header. Set these to a non-empty value. request = experiment.ListExperimentsRequest() - 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_experiments), "__call__") as call: @@ -745,7 +745,7 @@ def test_list_experiments_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -759,7 +759,7 @@ async def test_list_experiments_field_headers_async(): # a field header. Set these to a non-empty value. request = experiment.ListExperimentsRequest() - 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_experiments), "__call__") as call: @@ -777,7 +777,7 @@ async def test_list_experiments_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -908,7 +908,7 @@ def test_list_experiments_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, experiment.Experiment) for i in results) @@ -1165,7 +1165,7 @@ def test_get_experiment_field_headers(): # a field header. Set these to a non-empty value. request = experiment.GetExperimentRequest() - 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_experiment), "__call__") as call: @@ -1181,7 +1181,7 @@ def test_get_experiment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1195,7 +1195,7 @@ async def test_get_experiment_field_headers_async(): # a field header. Set these to a non-empty value. request = experiment.GetExperimentRequest() - 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_experiment), "__call__") as call: @@ -1213,7 +1213,7 @@ async def test_get_experiment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1420,7 +1420,7 @@ def test_create_experiment_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_experiment.CreateExperimentRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1438,7 +1438,7 @@ def test_create_experiment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1452,7 +1452,7 @@ async def test_create_experiment_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_experiment.CreateExperimentRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1472,7 +1472,7 @@ async def test_create_experiment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1693,7 +1693,7 @@ def test_update_experiment_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_experiment.UpdateExperimentRequest() - request.experiment.name = "experiment.name/value" + request.experiment.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1711,7 +1711,7 @@ def test_update_experiment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "experiment.name=experiment.name/value", + "experiment.name=name_value", ) in kw["metadata"] @@ -1725,7 +1725,7 @@ async def test_update_experiment_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_experiment.UpdateExperimentRequest() - request.experiment.name = "experiment.name/value" + request.experiment.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1745,7 +1745,7 @@ async def test_update_experiment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "experiment.name=experiment.name/value", + "experiment.name=name_value", ) in kw["metadata"] @@ -1941,7 +1941,7 @@ def test_delete_experiment_field_headers(): # a field header. Set these to a non-empty value. request = experiment.DeleteExperimentRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1959,7 +1959,7 @@ def test_delete_experiment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1973,7 +1973,7 @@ async def test_delete_experiment_field_headers_async(): # a field header. Set these to a non-empty value. request = experiment.DeleteExperimentRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1991,7 +1991,7 @@ async def test_delete_experiment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2193,7 +2193,7 @@ def test_start_experiment_field_headers(): # a field header. Set these to a non-empty value. request = experiment.StartExperimentRequest() - 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_experiment), "__call__") as call: @@ -2209,7 +2209,7 @@ def test_start_experiment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2223,7 +2223,7 @@ async def test_start_experiment_field_headers_async(): # a field header. Set these to a non-empty value. request = experiment.StartExperimentRequest() - 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_experiment), "__call__") as call: @@ -2241,7 +2241,7 @@ async def test_start_experiment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2441,7 +2441,7 @@ def test_stop_experiment_field_headers(): # a field header. Set these to a non-empty value. request = experiment.StopExperimentRequest() - 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_experiment), "__call__") as call: @@ -2457,7 +2457,7 @@ def test_stop_experiment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2471,7 +2471,7 @@ async def test_stop_experiment_field_headers_async(): # a field header. Set these to a non-empty value. request = experiment.StopExperimentRequest() - 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_experiment), "__call__") as call: @@ -2489,7 +2489,7 @@ async def test_stop_experiment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_flows.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_flows.py index 6cf57328653f..d5c362488880 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_flows.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_flows.py @@ -727,7 +727,7 @@ def test_create_flow_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_flow.CreateFlowRequest() - 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_flow), "__call__") as call: @@ -743,7 +743,7 @@ def test_create_flow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -757,7 +757,7 @@ async def test_create_flow_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_flow.CreateFlowRequest() - 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_flow), "__call__") as call: @@ -773,7 +773,7 @@ async def test_create_flow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -957,7 +957,7 @@ def test_delete_flow_field_headers(): # a field header. Set these to a non-empty value. request = flow.DeleteFlowRequest() - 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_flow), "__call__") as call: @@ -973,7 +973,7 @@ def test_delete_flow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -987,7 +987,7 @@ async def test_delete_flow_field_headers_async(): # a field header. Set these to a non-empty value. request = flow.DeleteFlowRequest() - 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_flow), "__call__") as call: @@ -1003,7 +1003,7 @@ async def test_delete_flow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1185,7 +1185,7 @@ def test_list_flows_field_headers(): # a field header. Set these to a non-empty value. request = flow.ListFlowsRequest() - 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_flows), "__call__") as call: @@ -1201,7 +1201,7 @@ def test_list_flows_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1215,7 +1215,7 @@ async def test_list_flows_field_headers_async(): # a field header. Set these to a non-empty value. request = flow.ListFlowsRequest() - 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_flows), "__call__") as call: @@ -1233,7 +1233,7 @@ async def test_list_flows_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1364,7 +1364,7 @@ def test_list_flows_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, flow.Flow) for i in results) @@ -1617,7 +1617,7 @@ def test_get_flow_field_headers(): # a field header. Set these to a non-empty value. request = flow.GetFlowRequest() - 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_flow), "__call__") as call: @@ -1633,7 +1633,7 @@ def test_get_flow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1647,7 +1647,7 @@ async def test_get_flow_field_headers_async(): # a field header. Set these to a non-empty value. request = flow.GetFlowRequest() - 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_flow), "__call__") as call: @@ -1663,7 +1663,7 @@ async def test_get_flow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1857,7 +1857,7 @@ def test_update_flow_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_flow.UpdateFlowRequest() - request.flow.name = "flow.name/value" + request.flow.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_flow), "__call__") as call: @@ -1873,7 +1873,7 @@ def test_update_flow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "flow.name=flow.name/value", + "flow.name=name_value", ) in kw["metadata"] @@ -1887,7 +1887,7 @@ async def test_update_flow_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_flow.UpdateFlowRequest() - request.flow.name = "flow.name/value" + request.flow.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_flow), "__call__") as call: @@ -1903,7 +1903,7 @@ async def test_update_flow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "flow.name=flow.name/value", + "flow.name=name_value", ) in kw["metadata"] @@ -2089,7 +2089,7 @@ def test_train_flow_field_headers(): # a field header. Set these to a non-empty value. request = flow.TrainFlowRequest() - 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.train_flow), "__call__") as call: @@ -2105,7 +2105,7 @@ def test_train_flow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2119,7 +2119,7 @@ async def test_train_flow_field_headers_async(): # a field header. Set these to a non-empty value. request = flow.TrainFlowRequest() - 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.train_flow), "__call__") as call: @@ -2137,7 +2137,7 @@ async def test_train_flow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2321,7 +2321,7 @@ def test_validate_flow_field_headers(): # a field header. Set these to a non-empty value. request = flow.ValidateFlowRequest() - 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.validate_flow), "__call__") as call: @@ -2337,7 +2337,7 @@ def test_validate_flow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2351,7 +2351,7 @@ async def test_validate_flow_field_headers_async(): # a field header. Set these to a non-empty value. request = flow.ValidateFlowRequest() - 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.validate_flow), "__call__") as call: @@ -2369,7 +2369,7 @@ async def test_validate_flow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2477,7 +2477,7 @@ def test_get_flow_validation_result_field_headers(): # a field header. Set these to a non-empty value. request = flow.GetFlowValidationResultRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2495,7 +2495,7 @@ def test_get_flow_validation_result_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2509,7 +2509,7 @@ async def test_get_flow_validation_result_field_headers_async(): # a field header. Set these to a non-empty value. request = flow.GetFlowValidationResultRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2529,7 +2529,7 @@ async def test_get_flow_validation_result_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2711,7 +2711,7 @@ def test_import_flow_field_headers(): # a field header. Set these to a non-empty value. request = flow.ImportFlowRequest() - 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.import_flow), "__call__") as call: @@ -2727,7 +2727,7 @@ def test_import_flow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2741,7 +2741,7 @@ async def test_import_flow_field_headers_async(): # a field header. Set these to a non-empty value. request = flow.ImportFlowRequest() - 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.import_flow), "__call__") as call: @@ -2759,7 +2759,7 @@ async def test_import_flow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2855,7 +2855,7 @@ def test_export_flow_field_headers(): # a field header. Set these to a non-empty value. request = flow.ExportFlowRequest() - 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.export_flow), "__call__") as call: @@ -2871,7 +2871,7 @@ def test_export_flow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2885,7 +2885,7 @@ async def test_export_flow_field_headers_async(): # a field header. Set these to a non-empty value. request = flow.ExportFlowRequest() - 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.export_flow), "__call__") as call: @@ -2903,7 +2903,7 @@ async def test_export_flow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_intents.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_intents.py index a9e84b0bf7b8..b124e8add763 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_intents.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_intents.py @@ -704,7 +704,7 @@ def test_list_intents_field_headers(): # a field header. Set these to a non-empty value. request = intent.ListIntentsRequest() - 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_intents), "__call__") as call: @@ -720,7 +720,7 @@ def test_list_intents_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -734,7 +734,7 @@ async def test_list_intents_field_headers_async(): # a field header. Set these to a non-empty value. request = intent.ListIntentsRequest() - 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_intents), "__call__") as call: @@ -752,7 +752,7 @@ async def test_list_intents_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -883,7 +883,7 @@ def test_list_intents_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, intent.Intent) for i in results) @@ -1140,7 +1140,7 @@ def test_get_intent_field_headers(): # a field header. Set these to a non-empty value. request = intent.GetIntentRequest() - 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_intent), "__call__") as call: @@ -1156,7 +1156,7 @@ def test_get_intent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1170,7 +1170,7 @@ async def test_get_intent_field_headers_async(): # a field header. Set these to a non-empty value. request = intent.GetIntentRequest() - 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_intent), "__call__") as call: @@ -1186,7 +1186,7 @@ async def test_get_intent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1384,7 +1384,7 @@ def test_create_intent_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_intent.CreateIntentRequest() - 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_intent), "__call__") as call: @@ -1400,7 +1400,7 @@ def test_create_intent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1414,7 +1414,7 @@ async def test_create_intent_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_intent.CreateIntentRequest() - 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_intent), "__call__") as call: @@ -1430,7 +1430,7 @@ async def test_create_intent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1638,7 +1638,7 @@ def test_update_intent_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_intent.UpdateIntentRequest() - request.intent.name = "intent.name/value" + request.intent.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_intent), "__call__") as call: @@ -1654,7 +1654,7 @@ def test_update_intent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "intent.name=intent.name/value", + "intent.name=name_value", ) in kw["metadata"] @@ -1668,7 +1668,7 @@ async def test_update_intent_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_intent.UpdateIntentRequest() - request.intent.name = "intent.name/value" + request.intent.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_intent), "__call__") as call: @@ -1684,7 +1684,7 @@ async def test_update_intent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "intent.name=intent.name/value", + "intent.name=name_value", ) in kw["metadata"] @@ -1868,7 +1868,7 @@ def test_delete_intent_field_headers(): # a field header. Set these to a non-empty value. request = intent.DeleteIntentRequest() - 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_intent), "__call__") as call: @@ -1884,7 +1884,7 @@ def test_delete_intent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1898,7 +1898,7 @@ async def test_delete_intent_field_headers_async(): # a field header. Set these to a non-empty value. request = intent.DeleteIntentRequest() - 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_intent), "__call__") as call: @@ -1914,7 +1914,7 @@ async def test_delete_intent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_pages.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_pages.py index 3d8ef7e47a92..7963e811b1fb 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_pages.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_pages.py @@ -707,7 +707,7 @@ def test_list_pages_field_headers(): # a field header. Set these to a non-empty value. request = page.ListPagesRequest() - 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_pages), "__call__") as call: @@ -723,7 +723,7 @@ def test_list_pages_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -737,7 +737,7 @@ async def test_list_pages_field_headers_async(): # a field header. Set these to a non-empty value. request = page.ListPagesRequest() - 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_pages), "__call__") as call: @@ -755,7 +755,7 @@ async def test_list_pages_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -886,7 +886,7 @@ def test_list_pages_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, page.Page) for i in results) @@ -1135,7 +1135,7 @@ def test_get_page_field_headers(): # a field header. Set these to a non-empty value. request = page.GetPageRequest() - 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_page), "__call__") as call: @@ -1151,7 +1151,7 @@ def test_get_page_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1165,7 +1165,7 @@ async def test_get_page_field_headers_async(): # a field header. Set these to a non-empty value. request = page.GetPageRequest() - 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_page), "__call__") as call: @@ -1181,7 +1181,7 @@ async def test_get_page_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1371,7 +1371,7 @@ def test_create_page_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_page.CreatePageRequest() - 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_page), "__call__") as call: @@ -1387,7 +1387,7 @@ def test_create_page_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1401,7 +1401,7 @@ async def test_create_page_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_page.CreatePageRequest() - 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_page), "__call__") as call: @@ -1417,7 +1417,7 @@ async def test_create_page_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1617,7 +1617,7 @@ def test_update_page_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_page.UpdatePageRequest() - request.page.name = "page.name/value" + request.page.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_page), "__call__") as call: @@ -1633,7 +1633,7 @@ def test_update_page_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "page.name=page.name/value", + "page.name=name_value", ) in kw["metadata"] @@ -1647,7 +1647,7 @@ async def test_update_page_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_page.UpdatePageRequest() - request.page.name = "page.name/value" + request.page.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_page), "__call__") as call: @@ -1663,7 +1663,7 @@ async def test_update_page_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "page.name=page.name/value", + "page.name=name_value", ) in kw["metadata"] @@ -1847,7 +1847,7 @@ def test_delete_page_field_headers(): # a field header. Set these to a non-empty value. request = page.DeletePageRequest() - 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_page), "__call__") as call: @@ -1863,7 +1863,7 @@ def test_delete_page_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1877,7 +1877,7 @@ async def test_delete_page_field_headers_async(): # a field header. Set these to a non-empty value. request = page.DeletePageRequest() - 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_page), "__call__") as call: @@ -1893,7 +1893,7 @@ async def test_delete_page_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_security_settings_service.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_security_settings_service.py index c4cd7ad6d236..14f810301106 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_security_settings_service.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_security_settings_service.py @@ -833,7 +833,7 @@ def test_create_security_settings_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_security_settings.CreateSecuritySettingsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -851,7 +851,7 @@ def test_create_security_settings_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -865,7 +865,7 @@ async def test_create_security_settings_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_security_settings.CreateSecuritySettingsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -885,7 +885,7 @@ async def test_create_security_settings_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1143,7 +1143,7 @@ def test_get_security_settings_field_headers(): # a field header. Set these to a non-empty value. request = security_settings.GetSecuritySettingsRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1161,7 +1161,7 @@ def test_get_security_settings_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1175,7 +1175,7 @@ async def test_get_security_settings_field_headers_async(): # a field header. Set these to a non-empty value. request = security_settings.GetSecuritySettingsRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1195,7 +1195,7 @@ async def test_get_security_settings_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1435,7 +1435,7 @@ def test_update_security_settings_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_security_settings.UpdateSecuritySettingsRequest() - request.security_settings.name = "security_settings.name/value" + request.security_settings.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1453,7 +1453,7 @@ def test_update_security_settings_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "security_settings.name=security_settings.name/value", + "security_settings.name=name_value", ) in kw["metadata"] @@ -1467,7 +1467,7 @@ async def test_update_security_settings_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_security_settings.UpdateSecuritySettingsRequest() - request.security_settings.name = "security_settings.name/value" + request.security_settings.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1487,7 +1487,7 @@ async def test_update_security_settings_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "security_settings.name=security_settings.name/value", + "security_settings.name=name_value", ) in kw["metadata"] @@ -1700,7 +1700,7 @@ def test_list_security_settings_field_headers(): # a field header. Set these to a non-empty value. request = security_settings.ListSecuritySettingsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1718,7 +1718,7 @@ def test_list_security_settings_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1732,7 +1732,7 @@ async def test_list_security_settings_field_headers_async(): # a field header. Set these to a non-empty value. request = security_settings.ListSecuritySettingsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1752,7 +1752,7 @@ async def test_list_security_settings_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1889,7 +1889,7 @@ def test_list_security_settings_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, security_settings.SecuritySettings) for i in results) @@ -2135,7 +2135,7 @@ def test_delete_security_settings_field_headers(): # a field header. Set these to a non-empty value. request = security_settings.DeleteSecuritySettingsRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2153,7 +2153,7 @@ def test_delete_security_settings_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2167,7 +2167,7 @@ async def test_delete_security_settings_field_headers_async(): # a field header. Set these to a non-empty value. request = security_settings.DeleteSecuritySettingsRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2185,7 +2185,7 @@ async def test_delete_security_settings_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_session_entity_types.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_session_entity_types.py index 16d4bc82ebd4..aebb3157783a 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_session_entity_types.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_session_entity_types.py @@ -777,7 +777,7 @@ def test_list_session_entity_types_field_headers(): # a field header. Set these to a non-empty value. request = session_entity_type.ListSessionEntityTypesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -795,7 +795,7 @@ def test_list_session_entity_types_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -809,7 +809,7 @@ async def test_list_session_entity_types_field_headers_async(): # a field header. Set these to a non-empty value. request = session_entity_type.ListSessionEntityTypesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -829,7 +829,7 @@ async def test_list_session_entity_types_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -966,7 +966,7 @@ def test_list_session_entity_types_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, session_entity_type.SessionEntityType) for i in results @@ -1234,7 +1234,7 @@ def test_get_session_entity_type_field_headers(): # a field header. Set these to a non-empty value. request = session_entity_type.GetSessionEntityTypeRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1252,7 +1252,7 @@ def test_get_session_entity_type_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1266,7 +1266,7 @@ async def test_get_session_entity_type_field_headers_async(): # a field header. Set these to a non-empty value. request = session_entity_type.GetSessionEntityTypeRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1286,7 +1286,7 @@ async def test_get_session_entity_type_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1491,7 +1491,7 @@ def test_create_session_entity_type_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_session_entity_type.CreateSessionEntityTypeRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1509,7 +1509,7 @@ def test_create_session_entity_type_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1523,7 +1523,7 @@ async def test_create_session_entity_type_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_session_entity_type.CreateSessionEntityTypeRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1543,7 +1543,7 @@ async def test_create_session_entity_type_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1766,7 +1766,7 @@ def test_update_session_entity_type_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_session_entity_type.UpdateSessionEntityTypeRequest() - request.session_entity_type.name = "session_entity_type.name/value" + request.session_entity_type.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1784,7 +1784,7 @@ def test_update_session_entity_type_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "session_entity_type.name=session_entity_type.name/value", + "session_entity_type.name=name_value", ) in kw["metadata"] @@ -1798,7 +1798,7 @@ async def test_update_session_entity_type_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_session_entity_type.UpdateSessionEntityTypeRequest() - request.session_entity_type.name = "session_entity_type.name/value" + request.session_entity_type.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1818,7 +1818,7 @@ async def test_update_session_entity_type_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "session_entity_type.name=session_entity_type.name/value", + "session_entity_type.name=name_value", ) in kw["metadata"] @@ -2023,7 +2023,7 @@ def test_delete_session_entity_type_field_headers(): # a field header. Set these to a non-empty value. request = session_entity_type.DeleteSessionEntityTypeRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2041,7 +2041,7 @@ def test_delete_session_entity_type_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2055,7 +2055,7 @@ async def test_delete_session_entity_type_field_headers_async(): # a field header. Set these to a non-empty value. request = session_entity_type.DeleteSessionEntityTypeRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2073,7 +2073,7 @@ async def test_delete_session_entity_type_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_sessions.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_sessions.py index 1f18eaa12d83..2bd51d1944c3 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_sessions.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_sessions.py @@ -729,7 +729,7 @@ def test_detect_intent_field_headers(): # a field header. Set these to a non-empty value. request = session.DetectIntentRequest() - request.session = "session/value" + request.session = "session_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.detect_intent), "__call__") as call: @@ -745,7 +745,7 @@ def test_detect_intent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "session=session/value", + "session=session_value", ) in kw["metadata"] @@ -759,7 +759,7 @@ async def test_detect_intent_field_headers_async(): # a field header. Set these to a non-empty value. request = session.DetectIntentRequest() - request.session = "session/value" + request.session = "session_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.detect_intent), "__call__") as call: @@ -777,7 +777,7 @@ async def test_detect_intent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "session=session/value", + "session=session_value", ) in kw["metadata"] @@ -951,7 +951,7 @@ def test_match_intent_field_headers(): # a field header. Set these to a non-empty value. request = session.MatchIntentRequest() - request.session = "session/value" + request.session = "session_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.match_intent), "__call__") as call: @@ -967,7 +967,7 @@ def test_match_intent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "session=session/value", + "session=session_value", ) in kw["metadata"] @@ -981,7 +981,7 @@ async def test_match_intent_field_headers_async(): # a field header. Set these to a non-empty value. request = session.MatchIntentRequest() - request.session = "session/value" + request.session = "session_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.match_intent), "__call__") as call: @@ -999,7 +999,7 @@ async def test_match_intent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "session=session/value", + "session=session_value", ) in kw["metadata"] @@ -1105,7 +1105,7 @@ def test_fulfill_intent_field_headers(): # a field header. Set these to a non-empty value. request = session.FulfillIntentRequest() - request.match_intent_request.session = "match_intent_request.session/value" + request.match_intent_request.session = "session_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.fulfill_intent), "__call__") as call: @@ -1121,7 +1121,7 @@ def test_fulfill_intent_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "match_intent_request.session=match_intent_request.session/value", + "match_intent_request.session=session_value", ) in kw["metadata"] @@ -1135,7 +1135,7 @@ async def test_fulfill_intent_field_headers_async(): # a field header. Set these to a non-empty value. request = session.FulfillIntentRequest() - request.match_intent_request.session = "match_intent_request.session/value" + request.match_intent_request.session = "session_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.fulfill_intent), "__call__") as call: @@ -1153,7 +1153,7 @@ async def test_fulfill_intent_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "match_intent_request.session=match_intent_request.session/value", + "match_intent_request.session=session_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_test_cases.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_test_cases.py index 3b5c12b8102b..75e425bf4021 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_test_cases.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_test_cases.py @@ -738,7 +738,7 @@ def test_list_test_cases_field_headers(): # a field header. Set these to a non-empty value. request = test_case.ListTestCasesRequest() - 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_test_cases), "__call__") as call: @@ -754,7 +754,7 @@ def test_list_test_cases_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -768,7 +768,7 @@ async def test_list_test_cases_field_headers_async(): # a field header. Set these to a non-empty value. request = test_case.ListTestCasesRequest() - 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_test_cases), "__call__") as call: @@ -786,7 +786,7 @@ async def test_list_test_cases_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -917,7 +917,7 @@ def test_list_test_cases_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, test_case.TestCase) for i in results) @@ -1156,7 +1156,7 @@ def test_batch_delete_test_cases_field_headers(): # a field header. Set these to a non-empty value. request = test_case.BatchDeleteTestCasesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1174,7 +1174,7 @@ def test_batch_delete_test_cases_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1188,7 +1188,7 @@ async def test_batch_delete_test_cases_field_headers_async(): # a field header. Set these to a non-empty value. request = test_case.BatchDeleteTestCasesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1206,7 +1206,7 @@ async def test_batch_delete_test_cases_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1404,7 +1404,7 @@ def test_get_test_case_field_headers(): # a field header. Set these to a non-empty value. request = test_case.GetTestCaseRequest() - 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_test_case), "__call__") as call: @@ -1420,7 +1420,7 @@ def test_get_test_case_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1434,7 +1434,7 @@ async def test_get_test_case_field_headers_async(): # a field header. Set these to a non-empty value. request = test_case.GetTestCaseRequest() - 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_test_case), "__call__") as call: @@ -1450,7 +1450,7 @@ async def test_get_test_case_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1644,7 +1644,7 @@ def test_create_test_case_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_test_case.CreateTestCaseRequest() - 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_test_case), "__call__") as call: @@ -1660,7 +1660,7 @@ def test_create_test_case_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1674,7 +1674,7 @@ async def test_create_test_case_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_test_case.CreateTestCaseRequest() - 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_test_case), "__call__") as call: @@ -1692,7 +1692,7 @@ async def test_create_test_case_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1898,7 +1898,7 @@ def test_update_test_case_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_test_case.UpdateTestCaseRequest() - request.test_case.name = "test_case.name/value" + request.test_case.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_test_case), "__call__") as call: @@ -1914,7 +1914,7 @@ def test_update_test_case_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "test_case.name=test_case.name/value", + "test_case.name=name_value", ) in kw["metadata"] @@ -1928,7 +1928,7 @@ async def test_update_test_case_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_test_case.UpdateTestCaseRequest() - request.test_case.name = "test_case.name/value" + request.test_case.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_test_case), "__call__") as call: @@ -1946,7 +1946,7 @@ async def test_update_test_case_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "test_case.name=test_case.name/value", + "test_case.name=name_value", ) in kw["metadata"] @@ -2134,7 +2134,7 @@ def test_run_test_case_field_headers(): # a field header. Set these to a non-empty value. request = test_case.RunTestCaseRequest() - 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.run_test_case), "__call__") as call: @@ -2150,7 +2150,7 @@ def test_run_test_case_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2164,7 +2164,7 @@ async def test_run_test_case_field_headers_async(): # a field header. Set these to a non-empty value. request = test_case.RunTestCaseRequest() - 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.run_test_case), "__call__") as call: @@ -2182,7 +2182,7 @@ async def test_run_test_case_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2284,7 +2284,7 @@ def test_batch_run_test_cases_field_headers(): # a field header. Set these to a non-empty value. request = test_case.BatchRunTestCasesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2302,7 +2302,7 @@ def test_batch_run_test_cases_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2316,7 +2316,7 @@ async def test_batch_run_test_cases_field_headers_async(): # a field header. Set these to a non-empty value. request = test_case.BatchRunTestCasesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2336,7 +2336,7 @@ async def test_batch_run_test_cases_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2447,7 +2447,7 @@ def test_calculate_coverage_field_headers(): # a field header. Set these to a non-empty value. request = test_case.CalculateCoverageRequest() - request.agent = "agent/value" + request.agent = "agent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2465,7 +2465,7 @@ def test_calculate_coverage_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "agent=agent/value", + "agent=agent_value", ) in kw["metadata"] @@ -2479,7 +2479,7 @@ async def test_calculate_coverage_field_headers_async(): # a field header. Set these to a non-empty value. request = test_case.CalculateCoverageRequest() - request.agent = "agent/value" + request.agent = "agent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2499,7 +2499,7 @@ async def test_calculate_coverage_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "agent=agent/value", + "agent=agent_value", ) in kw["metadata"] @@ -2601,7 +2601,7 @@ def test_import_test_cases_field_headers(): # a field header. Set these to a non-empty value. request = test_case.ImportTestCasesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2619,7 +2619,7 @@ def test_import_test_cases_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2633,7 +2633,7 @@ async def test_import_test_cases_field_headers_async(): # a field header. Set these to a non-empty value. request = test_case.ImportTestCasesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2653,7 +2653,7 @@ async def test_import_test_cases_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2755,7 +2755,7 @@ def test_export_test_cases_field_headers(): # a field header. Set these to a non-empty value. request = test_case.ExportTestCasesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2773,7 +2773,7 @@ def test_export_test_cases_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2787,7 +2787,7 @@ async def test_export_test_cases_field_headers_async(): # a field header. Set these to a non-empty value. request = test_case.ExportTestCasesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2807,7 +2807,7 @@ async def test_export_test_cases_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2915,7 +2915,7 @@ def test_list_test_case_results_field_headers(): # a field header. Set these to a non-empty value. request = test_case.ListTestCaseResultsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2933,7 +2933,7 @@ def test_list_test_case_results_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2947,7 +2947,7 @@ async def test_list_test_case_results_field_headers_async(): # a field header. Set these to a non-empty value. request = test_case.ListTestCaseResultsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2967,7 +2967,7 @@ async def test_list_test_case_results_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3104,7 +3104,7 @@ def test_list_test_case_results_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, test_case.TestCaseResult) for i in results) @@ -3365,7 +3365,7 @@ def test_get_test_case_result_field_headers(): # a field header. Set these to a non-empty value. request = test_case.GetTestCaseResultRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3383,7 +3383,7 @@ def test_get_test_case_result_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3397,7 +3397,7 @@ async def test_get_test_case_result_field_headers_async(): # a field header. Set these to a non-empty value. request = test_case.GetTestCaseResultRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3417,7 +3417,7 @@ async def test_get_test_case_result_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_transition_route_groups.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_transition_route_groups.py index 1b64f7c58478..5255ef2c48e9 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_transition_route_groups.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_transition_route_groups.py @@ -790,7 +790,7 @@ def test_list_transition_route_groups_field_headers(): # a field header. Set these to a non-empty value. request = transition_route_group.ListTransitionRouteGroupsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -808,7 +808,7 @@ def test_list_transition_route_groups_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -822,7 +822,7 @@ async def test_list_transition_route_groups_field_headers_async(): # a field header. Set these to a non-empty value. request = transition_route_group.ListTransitionRouteGroupsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -842,7 +842,7 @@ async def test_list_transition_route_groups_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -979,7 +979,7 @@ def test_list_transition_route_groups_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, transition_route_group.TransitionRouteGroup) for i in results @@ -1242,7 +1242,7 @@ def test_get_transition_route_group_field_headers(): # a field header. Set these to a non-empty value. request = transition_route_group.GetTransitionRouteGroupRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1260,7 +1260,7 @@ def test_get_transition_route_group_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1274,7 +1274,7 @@ async def test_get_transition_route_group_field_headers_async(): # a field header. Set these to a non-empty value. request = transition_route_group.GetTransitionRouteGroupRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1294,7 +1294,7 @@ async def test_get_transition_route_group_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1499,7 +1499,7 @@ def test_create_transition_route_group_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_transition_route_group.CreateTransitionRouteGroupRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1517,7 +1517,7 @@ def test_create_transition_route_group_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1531,7 +1531,7 @@ async def test_create_transition_route_group_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_transition_route_group.CreateTransitionRouteGroupRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1551,7 +1551,7 @@ async def test_create_transition_route_group_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1774,7 +1774,7 @@ def test_update_transition_route_group_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_transition_route_group.UpdateTransitionRouteGroupRequest() - request.transition_route_group.name = "transition_route_group.name/value" + request.transition_route_group.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1792,7 +1792,7 @@ def test_update_transition_route_group_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "transition_route_group.name=transition_route_group.name/value", + "transition_route_group.name=name_value", ) in kw["metadata"] @@ -1806,7 +1806,7 @@ async def test_update_transition_route_group_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_transition_route_group.UpdateTransitionRouteGroupRequest() - request.transition_route_group.name = "transition_route_group.name/value" + request.transition_route_group.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1826,7 +1826,7 @@ async def test_update_transition_route_group_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "transition_route_group.name=transition_route_group.name/value", + "transition_route_group.name=name_value", ) in kw["metadata"] @@ -2031,7 +2031,7 @@ def test_delete_transition_route_group_field_headers(): # a field header. Set these to a non-empty value. request = transition_route_group.DeleteTransitionRouteGroupRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2049,7 +2049,7 @@ def test_delete_transition_route_group_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2063,7 +2063,7 @@ async def test_delete_transition_route_group_field_headers_async(): # a field header. Set these to a non-empty value. request = transition_route_group.DeleteTransitionRouteGroupRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2081,7 +2081,7 @@ async def test_delete_transition_route_group_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_versions.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_versions.py index 31f6c4822714..de2a668b6fcf 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_versions.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_versions.py @@ -721,7 +721,7 @@ def test_list_versions_field_headers(): # a field header. Set these to a non-empty value. request = version.ListVersionsRequest() - 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_versions), "__call__") as call: @@ -737,7 +737,7 @@ def test_list_versions_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -751,7 +751,7 @@ async def test_list_versions_field_headers_async(): # a field header. Set these to a non-empty value. request = version.ListVersionsRequest() - 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_versions), "__call__") as call: @@ -769,7 +769,7 @@ async def test_list_versions_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -900,7 +900,7 @@ def test_list_versions_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, version.Version) for i in results) @@ -1153,7 +1153,7 @@ def test_get_version_field_headers(): # a field header. Set these to a non-empty value. request = version.GetVersionRequest() - 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_version), "__call__") as call: @@ -1169,7 +1169,7 @@ def test_get_version_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1183,7 +1183,7 @@ async def test_get_version_field_headers_async(): # a field header. Set these to a non-empty value. request = version.GetVersionRequest() - 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_version), "__call__") as call: @@ -1199,7 +1199,7 @@ async def test_get_version_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1375,7 +1375,7 @@ def test_create_version_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_version.CreateVersionRequest() - 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_version), "__call__") as call: @@ -1391,7 +1391,7 @@ def test_create_version_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1405,7 +1405,7 @@ async def test_create_version_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_version.CreateVersionRequest() - 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_version), "__call__") as call: @@ -1423,7 +1423,7 @@ async def test_create_version_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1629,7 +1629,7 @@ def test_update_version_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_version.UpdateVersionRequest() - request.version.name = "version.name/value" + request.version.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_version), "__call__") as call: @@ -1645,7 +1645,7 @@ def test_update_version_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "version.name=version.name/value", + "version.name=name_value", ) in kw["metadata"] @@ -1659,7 +1659,7 @@ async def test_update_version_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_version.UpdateVersionRequest() - request.version.name = "version.name/value" + request.version.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_version), "__call__") as call: @@ -1677,7 +1677,7 @@ async def test_update_version_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "version.name=version.name/value", + "version.name=name_value", ) in kw["metadata"] @@ -1863,7 +1863,7 @@ def test_delete_version_field_headers(): # a field header. Set these to a non-empty value. request = version.DeleteVersionRequest() - 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_version), "__call__") as call: @@ -1879,7 +1879,7 @@ def test_delete_version_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1893,7 +1893,7 @@ async def test_delete_version_field_headers_async(): # a field header. Set these to a non-empty value. request = version.DeleteVersionRequest() - 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_version), "__call__") as call: @@ -1909,7 +1909,7 @@ async def test_delete_version_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2085,7 +2085,7 @@ def test_load_version_field_headers(): # a field header. Set these to a non-empty value. request = version.LoadVersionRequest() - 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.load_version), "__call__") as call: @@ -2101,7 +2101,7 @@ def test_load_version_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2115,7 +2115,7 @@ async def test_load_version_field_headers_async(): # a field header. Set these to a non-empty value. request = version.LoadVersionRequest() - 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.load_version), "__call__") as call: @@ -2133,7 +2133,7 @@ async def test_load_version_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2321,7 +2321,7 @@ def test_compare_versions_field_headers(): # a field header. Set these to a non-empty value. request = version.CompareVersionsRequest() - request.base_version = "base_version/value" + request.base_version = "base_version_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.compare_versions), "__call__") as call: @@ -2337,7 +2337,7 @@ def test_compare_versions_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "base_version=base_version/value", + "base_version=base_version_value", ) in kw["metadata"] @@ -2351,7 +2351,7 @@ async def test_compare_versions_field_headers_async(): # a field header. Set these to a non-empty value. request = version.CompareVersionsRequest() - request.base_version = "base_version/value" + request.base_version = "base_version_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.compare_versions), "__call__") as call: @@ -2369,7 +2369,7 @@ async def test_compare_versions_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "base_version=base_version/value", + "base_version=base_version_value", ) in kw["metadata"] diff --git a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_webhooks.py b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_webhooks.py index b6c580a98bf8..b263e238c0eb 100644 --- a/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_webhooks.py +++ b/packages/google-cloud-dialogflow-cx/tests/unit/gapic/dialogflowcx_v3beta1/test_webhooks.py @@ -714,7 +714,7 @@ def test_list_webhooks_field_headers(): # a field header. Set these to a non-empty value. request = webhook.ListWebhooksRequest() - 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_webhooks), "__call__") as call: @@ -730,7 +730,7 @@ def test_list_webhooks_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -744,7 +744,7 @@ async def test_list_webhooks_field_headers_async(): # a field header. Set these to a non-empty value. request = webhook.ListWebhooksRequest() - 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_webhooks), "__call__") as call: @@ -762,7 +762,7 @@ async def test_list_webhooks_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -893,7 +893,7 @@ def test_list_webhooks_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, webhook.Webhook) for i in results) @@ -1143,7 +1143,7 @@ def test_get_webhook_field_headers(): # a field header. Set these to a non-empty value. request = webhook.GetWebhookRequest() - 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_webhook), "__call__") as call: @@ -1159,7 +1159,7 @@ def test_get_webhook_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1173,7 +1173,7 @@ async def test_get_webhook_field_headers_async(): # a field header. Set these to a non-empty value. request = webhook.GetWebhookRequest() - 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_webhook), "__call__") as call: @@ -1189,7 +1189,7 @@ async def test_get_webhook_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1380,7 +1380,7 @@ def test_create_webhook_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_webhook.CreateWebhookRequest() - 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_webhook), "__call__") as call: @@ -1396,7 +1396,7 @@ def test_create_webhook_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1410,7 +1410,7 @@ async def test_create_webhook_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_webhook.CreateWebhookRequest() - 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_webhook), "__call__") as call: @@ -1428,7 +1428,7 @@ async def test_create_webhook_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1631,7 +1631,7 @@ def test_update_webhook_field_headers(): # a field header. Set these to a non-empty value. request = gcdc_webhook.UpdateWebhookRequest() - request.webhook.name = "webhook.name/value" + request.webhook.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_webhook), "__call__") as call: @@ -1647,7 +1647,7 @@ def test_update_webhook_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "webhook.name=webhook.name/value", + "webhook.name=name_value", ) in kw["metadata"] @@ -1661,7 +1661,7 @@ async def test_update_webhook_field_headers_async(): # a field header. Set these to a non-empty value. request = gcdc_webhook.UpdateWebhookRequest() - request.webhook.name = "webhook.name/value" + request.webhook.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_webhook), "__call__") as call: @@ -1679,7 +1679,7 @@ async def test_update_webhook_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "webhook.name=webhook.name/value", + "webhook.name=name_value", ) in kw["metadata"] @@ -1865,7 +1865,7 @@ def test_delete_webhook_field_headers(): # a field header. Set these to a non-empty value. request = webhook.DeleteWebhookRequest() - 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_webhook), "__call__") as call: @@ -1881,7 +1881,7 @@ def test_delete_webhook_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1895,7 +1895,7 @@ async def test_delete_webhook_field_headers_async(): # a field header. Set these to a non-empty value. request = webhook.DeleteWebhookRequest() - 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_webhook), "__call__") as call: @@ -1911,7 +1911,7 @@ async def test_delete_webhook_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"]