diff --git a/packages/google-cloud-os-config/google/cloud/osconfig_v1/services/os_config_service/async_client.py b/packages/google-cloud-os-config/google/cloud/osconfig_v1/services/os_config_service/async_client.py index a2bc7666180c..c9b7c572dfab 100644 --- a/packages/google-cloud-os-config/google/cloud/osconfig_v1/services/os_config_service/async_client.py +++ b/packages/google-cloud-os-config/google/cloud/osconfig_v1/services/os_config_service/async_client.py @@ -232,9 +232,9 @@ async def execute_patch_job( from google.cloud import osconfig_v1 - def sample_execute_patch_job(): + async def sample_execute_patch_job(): # Create a client - client = osconfig_v1.OsConfigServiceClient() + client = osconfig_v1.OsConfigServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1.ExecutePatchJobRequest( @@ -242,7 +242,7 @@ def sample_execute_patch_job(): ) # Make the request - response = client.execute_patch_job(request=request) + response = await client.execute_patch_job(request=request) # Handle the response print(response) @@ -316,9 +316,9 @@ async def get_patch_job( from google.cloud import osconfig_v1 - def sample_get_patch_job(): + async def sample_get_patch_job(): # Create a client - client = osconfig_v1.OsConfigServiceClient() + client = osconfig_v1.OsConfigServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1.GetPatchJobRequest( @@ -326,7 +326,7 @@ def sample_get_patch_job(): ) # Make the request - response = client.get_patch_job(request=request) + response = await client.get_patch_job(request=request) # Handle the response print(response) @@ -419,9 +419,9 @@ async def cancel_patch_job( from google.cloud import osconfig_v1 - def sample_cancel_patch_job(): + async def sample_cancel_patch_job(): # Create a client - client = osconfig_v1.OsConfigServiceClient() + client = osconfig_v1.OsConfigServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1.CancelPatchJobRequest( @@ -429,7 +429,7 @@ def sample_cancel_patch_job(): ) # Make the request - response = client.cancel_patch_job(request=request) + response = await client.cancel_patch_job(request=request) # Handle the response print(response) @@ -500,9 +500,9 @@ async def list_patch_jobs( from google.cloud import osconfig_v1 - def sample_list_patch_jobs(): + async def sample_list_patch_jobs(): # Create a client - client = osconfig_v1.OsConfigServiceClient() + client = osconfig_v1.OsConfigServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1.ListPatchJobsRequest( @@ -513,7 +513,7 @@ def sample_list_patch_jobs(): page_result = client.list_patch_jobs(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -606,9 +606,9 @@ async def list_patch_job_instance_details( from google.cloud import osconfig_v1 - def sample_list_patch_job_instance_details(): + async def sample_list_patch_job_instance_details(): # Create a client - client = osconfig_v1.OsConfigServiceClient() + client = osconfig_v1.OsConfigServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1.ListPatchJobInstanceDetailsRequest( @@ -619,7 +619,7 @@ def sample_list_patch_job_instance_details(): page_result = client.list_patch_job_instance_details(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -716,9 +716,9 @@ async def create_patch_deployment( from google.cloud import osconfig_v1 - def sample_create_patch_deployment(): + async def sample_create_patch_deployment(): # Create a client - client = osconfig_v1.OsConfigServiceClient() + client = osconfig_v1.OsConfigServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1.CreatePatchDeploymentRequest( @@ -727,7 +727,7 @@ def sample_create_patch_deployment(): ) # Make the request - response = client.create_patch_deployment(request=request) + response = await client.create_patch_deployment(request=request) # Handle the response print(response) @@ -841,9 +841,9 @@ async def get_patch_deployment( from google.cloud import osconfig_v1 - def sample_get_patch_deployment(): + async def sample_get_patch_deployment(): # Create a client - client = osconfig_v1.OsConfigServiceClient() + client = osconfig_v1.OsConfigServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1.GetPatchDeploymentRequest( @@ -851,7 +851,7 @@ def sample_get_patch_deployment(): ) # Make the request - response = client.get_patch_deployment(request=request) + response = await client.get_patch_deployment(request=request) # Handle the response print(response) @@ -940,9 +940,9 @@ async def list_patch_deployments( from google.cloud import osconfig_v1 - def sample_list_patch_deployments(): + async def sample_list_patch_deployments(): # Create a client - client = osconfig_v1.OsConfigServiceClient() + client = osconfig_v1.OsConfigServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1.ListPatchDeploymentsRequest( @@ -953,7 +953,7 @@ def sample_list_patch_deployments(): page_result = client.list_patch_deployments(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -1048,9 +1048,9 @@ async def delete_patch_deployment( from google.cloud import osconfig_v1 - def sample_delete_patch_deployment(): + async def sample_delete_patch_deployment(): # Create a client - client = osconfig_v1.OsConfigServiceClient() + client = osconfig_v1.OsConfigServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1.DeletePatchDeploymentRequest( @@ -1058,7 +1058,7 @@ def sample_delete_patch_deployment(): ) # Make the request - client.delete_patch_deployment(request=request) + await client.delete_patch_deployment(request=request) Args: request (Union[google.cloud.osconfig_v1.types.DeletePatchDeploymentRequest, dict]): @@ -1132,16 +1132,16 @@ async def update_patch_deployment( from google.cloud import osconfig_v1 - def sample_update_patch_deployment(): + async def sample_update_patch_deployment(): # Create a client - client = osconfig_v1.OsConfigServiceClient() + client = osconfig_v1.OsConfigServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1.UpdatePatchDeploymentRequest( ) # Make the request - response = client.update_patch_deployment(request=request) + response = await client.update_patch_deployment(request=request) # Handle the response print(response) @@ -1244,9 +1244,9 @@ async def pause_patch_deployment( from google.cloud import osconfig_v1 - def sample_pause_patch_deployment(): + async def sample_pause_patch_deployment(): # Create a client - client = osconfig_v1.OsConfigServiceClient() + client = osconfig_v1.OsConfigServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1.PausePatchDeploymentRequest( @@ -1254,7 +1254,7 @@ def sample_pause_patch_deployment(): ) # Make the request - response = client.pause_patch_deployment(request=request) + response = await client.pause_patch_deployment(request=request) # Handle the response print(response) @@ -1345,9 +1345,9 @@ async def resume_patch_deployment( from google.cloud import osconfig_v1 - def sample_resume_patch_deployment(): + async def sample_resume_patch_deployment(): # Create a client - client = osconfig_v1.OsConfigServiceClient() + client = osconfig_v1.OsConfigServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1.ResumePatchDeploymentRequest( @@ -1355,7 +1355,7 @@ def sample_resume_patch_deployment(): ) # Make the request - response = client.resume_patch_deployment(request=request) + response = await client.resume_patch_deployment(request=request) # Handle the response print(response) diff --git a/packages/google-cloud-os-config/google/cloud/osconfig_v1/services/os_config_zonal_service/async_client.py b/packages/google-cloud-os-config/google/cloud/osconfig_v1/services/os_config_zonal_service/async_client.py index 50c4b4ab2122..c9705f9bd329 100644 --- a/packages/google-cloud-os-config/google/cloud/osconfig_v1/services/os_config_zonal_service/async_client.py +++ b/packages/google-cloud-os-config/google/cloud/osconfig_v1/services/os_config_zonal_service/async_client.py @@ -275,9 +275,9 @@ async def create_os_policy_assignment( from google.cloud import osconfig_v1 - def sample_create_os_policy_assignment(): + async def sample_create_os_policy_assignment(): # Create a client - client = osconfig_v1.OsConfigZonalServiceClient() + client = osconfig_v1.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) os_policy_assignment = osconfig_v1.OSPolicyAssignment() @@ -299,7 +299,7 @@ def sample_create_os_policy_assignment(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -444,9 +444,9 @@ async def update_os_policy_assignment( from google.cloud import osconfig_v1 - def sample_update_os_policy_assignment(): + async def sample_update_os_policy_assignment(): # Create a client - client = osconfig_v1.OsConfigZonalServiceClient() + client = osconfig_v1.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) os_policy_assignment = osconfig_v1.OSPolicyAssignment() @@ -466,7 +466,7 @@ def sample_update_os_policy_assignment(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -587,9 +587,9 @@ async def get_os_policy_assignment( from google.cloud import osconfig_v1 - def sample_get_os_policy_assignment(): + async def sample_get_os_policy_assignment(): # Create a client - client = osconfig_v1.OsConfigZonalServiceClient() + client = osconfig_v1.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1.GetOSPolicyAssignmentRequest( @@ -597,7 +597,7 @@ def sample_get_os_policy_assignment(): ) # Make the request - response = client.get_os_policy_assignment(request=request) + response = await client.get_os_policy_assignment(request=request) # Handle the response print(response) @@ -699,9 +699,9 @@ async def list_os_policy_assignments( from google.cloud import osconfig_v1 - def sample_list_os_policy_assignments(): + async def sample_list_os_policy_assignments(): # Create a client - client = osconfig_v1.OsConfigZonalServiceClient() + client = osconfig_v1.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1.ListOSPolicyAssignmentsRequest( @@ -712,7 +712,7 @@ def sample_list_os_policy_assignments(): page_result = client.list_os_policy_assignments(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -808,9 +808,9 @@ async def list_os_policy_assignment_revisions( from google.cloud import osconfig_v1 - def sample_list_os_policy_assignment_revisions(): + async def sample_list_os_policy_assignment_revisions(): # Create a client - client = osconfig_v1.OsConfigZonalServiceClient() + client = osconfig_v1.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1.ListOSPolicyAssignmentRevisionsRequest( @@ -821,7 +821,7 @@ def sample_list_os_policy_assignment_revisions(): page_result = client.list_os_policy_assignment_revisions(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -930,9 +930,9 @@ async def delete_os_policy_assignment( from google.cloud import osconfig_v1 - def sample_delete_os_policy_assignment(): + async def sample_delete_os_policy_assignment(): # Create a client - client = osconfig_v1.OsConfigZonalServiceClient() + client = osconfig_v1.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1.DeleteOSPolicyAssignmentRequest( @@ -944,7 +944,7 @@ def sample_delete_os_policy_assignment(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1053,9 +1053,9 @@ async def get_os_policy_assignment_report( from google.cloud import osconfig_v1 - def sample_get_os_policy_assignment_report(): + async def sample_get_os_policy_assignment_report(): # Create a client - client = osconfig_v1.OsConfigZonalServiceClient() + client = osconfig_v1.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1.GetOSPolicyAssignmentReportRequest( @@ -1063,7 +1063,7 @@ def sample_get_os_policy_assignment_report(): ) # Make the request - response = client.get_os_policy_assignment_report(request=request) + response = await client.get_os_policy_assignment_report(request=request) # Handle the response print(response) @@ -1163,9 +1163,9 @@ async def list_os_policy_assignment_reports( from google.cloud import osconfig_v1 - def sample_list_os_policy_assignment_reports(): + async def sample_list_os_policy_assignment_reports(): # Create a client - client = osconfig_v1.OsConfigZonalServiceClient() + client = osconfig_v1.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1.ListOSPolicyAssignmentReportsRequest( @@ -1176,7 +1176,7 @@ def sample_list_os_policy_assignment_reports(): page_result = client.list_os_policy_assignment_reports(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -1299,9 +1299,9 @@ async def get_inventory( from google.cloud import osconfig_v1 - def sample_get_inventory(): + async def sample_get_inventory(): # Create a client - client = osconfig_v1.OsConfigZonalServiceClient() + client = osconfig_v1.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1.GetInventoryRequest( @@ -1309,7 +1309,7 @@ def sample_get_inventory(): ) # Make the request - response = client.get_inventory(request=request) + response = await client.get_inventory(request=request) # Handle the response print(response) @@ -1410,9 +1410,9 @@ async def list_inventories( from google.cloud import osconfig_v1 - def sample_list_inventories(): + async def sample_list_inventories(): # Create a client - client = osconfig_v1.OsConfigZonalServiceClient() + client = osconfig_v1.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1.ListInventoriesRequest( @@ -1423,7 +1423,7 @@ def sample_list_inventories(): page_result = client.list_inventories(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -1526,9 +1526,9 @@ async def get_vulnerability_report( from google.cloud import osconfig_v1 - def sample_get_vulnerability_report(): + async def sample_get_vulnerability_report(): # Create a client - client = osconfig_v1.OsConfigZonalServiceClient() + client = osconfig_v1.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1.GetVulnerabilityReportRequest( @@ -1536,7 +1536,7 @@ def sample_get_vulnerability_report(): ) # Make the request - response = client.get_vulnerability_report(request=request) + response = await client.get_vulnerability_report(request=request) # Handle the response print(response) @@ -1633,9 +1633,9 @@ async def list_vulnerability_reports( from google.cloud import osconfig_v1 - def sample_list_vulnerability_reports(): + async def sample_list_vulnerability_reports(): # Create a client - client = osconfig_v1.OsConfigZonalServiceClient() + client = osconfig_v1.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1.ListVulnerabilityReportsRequest( @@ -1646,7 +1646,7 @@ def sample_list_vulnerability_reports(): page_result = client.list_vulnerability_reports(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: diff --git a/packages/google-cloud-os-config/google/cloud/osconfig_v1alpha/services/os_config_zonal_service/async_client.py b/packages/google-cloud-os-config/google/cloud/osconfig_v1alpha/services/os_config_zonal_service/async_client.py index c18bc7b46c8b..a3acbce7671f 100644 --- a/packages/google-cloud-os-config/google/cloud/osconfig_v1alpha/services/os_config_zonal_service/async_client.py +++ b/packages/google-cloud-os-config/google/cloud/osconfig_v1alpha/services/os_config_zonal_service/async_client.py @@ -284,9 +284,9 @@ async def create_os_policy_assignment( from google.cloud import osconfig_v1alpha - def sample_create_os_policy_assignment(): + async def sample_create_os_policy_assignment(): # Create a client - client = osconfig_v1alpha.OsConfigZonalServiceClient() + client = osconfig_v1alpha.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) os_policy_assignment = osconfig_v1alpha.OSPolicyAssignment() @@ -308,7 +308,7 @@ def sample_create_os_policy_assignment(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -453,9 +453,9 @@ async def update_os_policy_assignment( from google.cloud import osconfig_v1alpha - def sample_update_os_policy_assignment(): + async def sample_update_os_policy_assignment(): # Create a client - client = osconfig_v1alpha.OsConfigZonalServiceClient() + client = osconfig_v1alpha.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) os_policy_assignment = osconfig_v1alpha.OSPolicyAssignment() @@ -475,7 +475,7 @@ def sample_update_os_policy_assignment(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -596,9 +596,9 @@ async def get_os_policy_assignment( from google.cloud import osconfig_v1alpha - def sample_get_os_policy_assignment(): + async def sample_get_os_policy_assignment(): # Create a client - client = osconfig_v1alpha.OsConfigZonalServiceClient() + client = osconfig_v1alpha.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1alpha.GetOSPolicyAssignmentRequest( @@ -606,7 +606,7 @@ def sample_get_os_policy_assignment(): ) # Make the request - response = client.get_os_policy_assignment(request=request) + response = await client.get_os_policy_assignment(request=request) # Handle the response print(response) @@ -708,9 +708,9 @@ async def list_os_policy_assignments( from google.cloud import osconfig_v1alpha - def sample_list_os_policy_assignments(): + async def sample_list_os_policy_assignments(): # Create a client - client = osconfig_v1alpha.OsConfigZonalServiceClient() + client = osconfig_v1alpha.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1alpha.ListOSPolicyAssignmentsRequest( @@ -721,7 +721,7 @@ def sample_list_os_policy_assignments(): page_result = client.list_os_policy_assignments(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -817,9 +817,9 @@ async def list_os_policy_assignment_revisions( from google.cloud import osconfig_v1alpha - def sample_list_os_policy_assignment_revisions(): + async def sample_list_os_policy_assignment_revisions(): # Create a client - client = osconfig_v1alpha.OsConfigZonalServiceClient() + client = osconfig_v1alpha.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1alpha.ListOSPolicyAssignmentRevisionsRequest( @@ -830,7 +830,7 @@ def sample_list_os_policy_assignment_revisions(): page_result = client.list_os_policy_assignment_revisions(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -939,9 +939,9 @@ async def delete_os_policy_assignment( from google.cloud import osconfig_v1alpha - def sample_delete_os_policy_assignment(): + async def sample_delete_os_policy_assignment(): # Create a client - client = osconfig_v1alpha.OsConfigZonalServiceClient() + client = osconfig_v1alpha.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1alpha.DeleteOSPolicyAssignmentRequest( @@ -953,7 +953,7 @@ def sample_delete_os_policy_assignment(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1062,9 +1062,9 @@ async def get_instance_os_policies_compliance( from google.cloud import osconfig_v1alpha - def sample_get_instance_os_policies_compliance(): + async def sample_get_instance_os_policies_compliance(): # Create a client - client = osconfig_v1alpha.OsConfigZonalServiceClient() + client = osconfig_v1alpha.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1alpha.GetInstanceOSPoliciesComplianceRequest( @@ -1072,7 +1072,7 @@ def sample_get_instance_os_policies_compliance(): ) # Make the request - response = client.get_instance_os_policies_compliance(request=request) + response = await client.get_instance_os_policies_compliance(request=request) # Handle the response print(response) @@ -1192,9 +1192,9 @@ async def list_instance_os_policies_compliances( from google.cloud import osconfig_v1alpha - def sample_list_instance_os_policies_compliances(): + async def sample_list_instance_os_policies_compliances(): # Create a client - client = osconfig_v1alpha.OsConfigZonalServiceClient() + client = osconfig_v1alpha.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1alpha.ListInstanceOSPoliciesCompliancesRequest( @@ -1205,7 +1205,7 @@ def sample_list_instance_os_policies_compliances(): page_result = client.list_instance_os_policies_compliances(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -1318,9 +1318,9 @@ async def get_os_policy_assignment_report( from google.cloud import osconfig_v1alpha - def sample_get_os_policy_assignment_report(): + async def sample_get_os_policy_assignment_report(): # Create a client - client = osconfig_v1alpha.OsConfigZonalServiceClient() + client = osconfig_v1alpha.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1alpha.GetOSPolicyAssignmentReportRequest( @@ -1328,7 +1328,7 @@ def sample_get_os_policy_assignment_report(): ) # Make the request - response = client.get_os_policy_assignment_report(request=request) + response = await client.get_os_policy_assignment_report(request=request) # Handle the response print(response) @@ -1428,9 +1428,9 @@ async def list_os_policy_assignment_reports( from google.cloud import osconfig_v1alpha - def sample_list_os_policy_assignment_reports(): + async def sample_list_os_policy_assignment_reports(): # Create a client - client = osconfig_v1alpha.OsConfigZonalServiceClient() + client = osconfig_v1alpha.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1alpha.ListOSPolicyAssignmentReportsRequest( @@ -1441,7 +1441,7 @@ def sample_list_os_policy_assignment_reports(): page_result = client.list_os_policy_assignment_reports(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -1564,9 +1564,9 @@ async def get_inventory( from google.cloud import osconfig_v1alpha - def sample_get_inventory(): + async def sample_get_inventory(): # Create a client - client = osconfig_v1alpha.OsConfigZonalServiceClient() + client = osconfig_v1alpha.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1alpha.GetInventoryRequest( @@ -1574,7 +1574,7 @@ def sample_get_inventory(): ) # Make the request - response = client.get_inventory(request=request) + response = await client.get_inventory(request=request) # Handle the response print(response) @@ -1675,9 +1675,9 @@ async def list_inventories( from google.cloud import osconfig_v1alpha - def sample_list_inventories(): + async def sample_list_inventories(): # Create a client - client = osconfig_v1alpha.OsConfigZonalServiceClient() + client = osconfig_v1alpha.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1alpha.ListInventoriesRequest( @@ -1688,7 +1688,7 @@ def sample_list_inventories(): page_result = client.list_inventories(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -1791,9 +1791,9 @@ async def get_vulnerability_report( from google.cloud import osconfig_v1alpha - def sample_get_vulnerability_report(): + async def sample_get_vulnerability_report(): # Create a client - client = osconfig_v1alpha.OsConfigZonalServiceClient() + client = osconfig_v1alpha.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1alpha.GetVulnerabilityReportRequest( @@ -1801,7 +1801,7 @@ def sample_get_vulnerability_report(): ) # Make the request - response = client.get_vulnerability_report(request=request) + response = await client.get_vulnerability_report(request=request) # Handle the response print(response) @@ -1898,9 +1898,9 @@ async def list_vulnerability_reports( from google.cloud import osconfig_v1alpha - def sample_list_vulnerability_reports(): + async def sample_list_vulnerability_reports(): # Create a client - client = osconfig_v1alpha.OsConfigZonalServiceClient() + client = osconfig_v1alpha.OsConfigZonalServiceAsyncClient() # Initialize request argument(s) request = osconfig_v1alpha.ListVulnerabilityReportsRequest( @@ -1911,7 +1911,7 @@ def sample_list_vulnerability_reports(): page_result = client.list_vulnerability_reports(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: diff --git a/packages/google-cloud-os-config/tests/unit/gapic/osconfig_v1/test_os_config_service.py b/packages/google-cloud-os-config/tests/unit/gapic/osconfig_v1/test_os_config_service.py index 62bd8636eab1..29e7d2bb3308 100644 --- a/packages/google-cloud-os-config/tests/unit/gapic/osconfig_v1/test_os_config_service.py +++ b/packages/google-cloud-os-config/tests/unit/gapic/osconfig_v1/test_os_config_service.py @@ -799,7 +799,7 @@ def test_execute_patch_job_field_headers(): # a field header. Set these to a non-empty value. request = patch_jobs.ExecutePatchJobRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -817,7 +817,7 @@ def test_execute_patch_job_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -831,7 +831,7 @@ async def test_execute_patch_job_field_headers_async(): # a field header. Set these to a non-empty value. request = patch_jobs.ExecutePatchJobRequest() - 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 @@ async def test_execute_patch_job_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_get_patch_job_field_headers(): # a field header. Set these to a non-empty value. request = patch_jobs.GetPatchJobRequest() - 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_patch_job), "__call__") as call: @@ -995,7 +995,7 @@ def test_get_patch_job_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1009,7 +1009,7 @@ async def test_get_patch_job_field_headers_async(): # a field header. Set these to a non-empty value. request = patch_jobs.GetPatchJobRequest() - 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_patch_job), "__call__") as call: @@ -1025,7 +1025,7 @@ async def test_get_patch_job_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1235,7 +1235,7 @@ def test_cancel_patch_job_field_headers(): # a field header. Set these to a non-empty value. request = patch_jobs.CancelPatchJobRequest() - 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.cancel_patch_job), "__call__") as call: @@ -1251,7 +1251,7 @@ def test_cancel_patch_job_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1265,7 +1265,7 @@ async def test_cancel_patch_job_field_headers_async(): # a field header. Set these to a non-empty value. request = patch_jobs.CancelPatchJobRequest() - 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.cancel_patch_job), "__call__") as call: @@ -1281,7 +1281,7 @@ async def test_cancel_patch_job_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1383,7 +1383,7 @@ def test_list_patch_jobs_field_headers(): # a field header. Set these to a non-empty value. request = patch_jobs.ListPatchJobsRequest() - 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_patch_jobs), "__call__") as call: @@ -1399,7 +1399,7 @@ def test_list_patch_jobs_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1413,7 +1413,7 @@ async def test_list_patch_jobs_field_headers_async(): # a field header. Set these to a non-empty value. request = patch_jobs.ListPatchJobsRequest() - 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_patch_jobs), "__call__") as call: @@ -1431,7 +1431,7 @@ async def test_list_patch_jobs_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1562,7 +1562,7 @@ def test_list_patch_jobs_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, patch_jobs.PatchJob) for i in results) @@ -1810,7 +1810,7 @@ def test_list_patch_job_instance_details_field_headers(): # a field header. Set these to a non-empty value. request = patch_jobs.ListPatchJobInstanceDetailsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1828,7 +1828,7 @@ def test_list_patch_job_instance_details_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1842,7 +1842,7 @@ async def test_list_patch_job_instance_details_field_headers_async(): # a field header. Set these to a non-empty value. request = patch_jobs.ListPatchJobInstanceDetailsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1862,7 +1862,7 @@ async def test_list_patch_job_instance_details_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1999,7 +1999,7 @@ def test_list_patch_job_instance_details_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, patch_jobs.PatchJobInstanceDetails) for i in results) @@ -2264,7 +2264,7 @@ def test_create_patch_deployment_field_headers(): # a field header. Set these to a non-empty value. request = patch_deployments.CreatePatchDeploymentRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2282,7 +2282,7 @@ def test_create_patch_deployment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2296,7 +2296,7 @@ async def test_create_patch_deployment_field_headers_async(): # a field header. Set these to a non-empty value. request = patch_deployments.CreatePatchDeploymentRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2316,7 +2316,7 @@ async def test_create_patch_deployment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2542,7 +2542,7 @@ def test_get_patch_deployment_field_headers(): # a field header. Set these to a non-empty value. request = patch_deployments.GetPatchDeploymentRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2560,7 +2560,7 @@ def test_get_patch_deployment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2574,7 +2574,7 @@ async def test_get_patch_deployment_field_headers_async(): # a field header. Set these to a non-empty value. request = patch_deployments.GetPatchDeploymentRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2594,7 +2594,7 @@ async def test_get_patch_deployment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2789,7 +2789,7 @@ def test_list_patch_deployments_field_headers(): # a field header. Set these to a non-empty value. request = patch_deployments.ListPatchDeploymentsRequest() - 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 @@ def test_list_patch_deployments_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2821,7 +2821,7 @@ async def test_list_patch_deployments_field_headers_async(): # a field header. Set these to a non-empty value. request = patch_deployments.ListPatchDeploymentsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2841,7 +2841,7 @@ async def test_list_patch_deployments_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2978,7 +2978,7 @@ def test_list_patch_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, patch_deployments.PatchDeployment) for i in results) @@ -3224,7 +3224,7 @@ def test_delete_patch_deployment_field_headers(): # a field header. Set these to a non-empty value. request = patch_deployments.DeletePatchDeploymentRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3242,7 +3242,7 @@ def test_delete_patch_deployment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3256,7 +3256,7 @@ async def test_delete_patch_deployment_field_headers_async(): # a field header. Set these to a non-empty value. request = patch_deployments.DeletePatchDeploymentRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3274,7 +3274,7 @@ async def test_delete_patch_deployment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3478,7 +3478,7 @@ def test_update_patch_deployment_field_headers(): # a field header. Set these to a non-empty value. request = patch_deployments.UpdatePatchDeploymentRequest() - request.patch_deployment.name = "patch_deployment.name/value" + request.patch_deployment.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3496,7 +3496,7 @@ def test_update_patch_deployment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "patch_deployment.name=patch_deployment.name/value", + "patch_deployment.name=name_value", ) in kw["metadata"] @@ -3510,7 +3510,7 @@ async def test_update_patch_deployment_field_headers_async(): # a field header. Set these to a non-empty value. request = patch_deployments.UpdatePatchDeploymentRequest() - request.patch_deployment.name = "patch_deployment.name/value" + request.patch_deployment.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3530,7 +3530,7 @@ async def test_update_patch_deployment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "patch_deployment.name=patch_deployment.name/value", + "patch_deployment.name=name_value", ) in kw["metadata"] @@ -3746,7 +3746,7 @@ def test_pause_patch_deployment_field_headers(): # a field header. Set these to a non-empty value. request = patch_deployments.PausePatchDeploymentRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3764,7 +3764,7 @@ def test_pause_patch_deployment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3778,7 +3778,7 @@ async def test_pause_patch_deployment_field_headers_async(): # a field header. Set these to a non-empty value. request = patch_deployments.PausePatchDeploymentRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3798,7 +3798,7 @@ async def test_pause_patch_deployment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4004,7 +4004,7 @@ def test_resume_patch_deployment_field_headers(): # a field header. Set these to a non-empty value. request = patch_deployments.ResumePatchDeploymentRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4022,7 +4022,7 @@ def test_resume_patch_deployment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4036,7 +4036,7 @@ async def test_resume_patch_deployment_field_headers_async(): # a field header. Set these to a non-empty value. request = patch_deployments.ResumePatchDeploymentRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4056,7 +4056,7 @@ async def test_resume_patch_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-os-config/tests/unit/gapic/osconfig_v1/test_os_config_zonal_service.py b/packages/google-cloud-os-config/tests/unit/gapic/osconfig_v1/test_os_config_zonal_service.py index debf05c1c75f..8a827ce33725 100644 --- a/packages/google-cloud-os-config/tests/unit/gapic/osconfig_v1/test_os_config_zonal_service.py +++ b/packages/google-cloud-os-config/tests/unit/gapic/osconfig_v1/test_os_config_zonal_service.py @@ -785,7 +785,7 @@ def test_create_os_policy_assignment_field_headers(): # a field header. Set these to a non-empty value. request = os_policy_assignments.CreateOSPolicyAssignmentRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -803,7 +803,7 @@ def test_create_os_policy_assignment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -817,7 +817,7 @@ async def test_create_os_policy_assignment_field_headers_async(): # a field header. Set these to a non-empty value. request = os_policy_assignments.CreateOSPolicyAssignmentRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -837,7 +837,7 @@ async def test_create_os_policy_assignment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1054,7 +1054,7 @@ def test_update_os_policy_assignment_field_headers(): # a field header. Set these to a non-empty value. request = os_policy_assignments.UpdateOSPolicyAssignmentRequest() - request.os_policy_assignment.name = "os_policy_assignment.name/value" + request.os_policy_assignment.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1072,7 +1072,7 @@ def test_update_os_policy_assignment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "os_policy_assignment.name=os_policy_assignment.name/value", + "os_policy_assignment.name=name_value", ) in kw["metadata"] @@ -1086,7 +1086,7 @@ async def test_update_os_policy_assignment_field_headers_async(): # a field header. Set these to a non-empty value. request = os_policy_assignments.UpdateOSPolicyAssignmentRequest() - request.os_policy_assignment.name = "os_policy_assignment.name/value" + request.os_policy_assignment.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1106,7 +1106,7 @@ async def test_update_os_policy_assignment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "os_policy_assignment.name=os_policy_assignment.name/value", + "os_policy_assignment.name=name_value", ) in kw["metadata"] @@ -1357,7 +1357,7 @@ def test_get_os_policy_assignment_field_headers(): # a field header. Set these to a non-empty value. request = os_policy_assignments.GetOSPolicyAssignmentRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1375,7 +1375,7 @@ def test_get_os_policy_assignment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1389,7 +1389,7 @@ async def test_get_os_policy_assignment_field_headers_async(): # a field header. Set these to a non-empty value. request = os_policy_assignments.GetOSPolicyAssignmentRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1409,7 +1409,7 @@ async def test_get_os_policy_assignment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1604,7 +1604,7 @@ def test_list_os_policy_assignments_field_headers(): # a field header. Set these to a non-empty value. request = os_policy_assignments.ListOSPolicyAssignmentsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1622,7 +1622,7 @@ def test_list_os_policy_assignments_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1636,7 +1636,7 @@ async def test_list_os_policy_assignments_field_headers_async(): # a field header. Set these to a non-empty value. request = os_policy_assignments.ListOSPolicyAssignmentsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1656,7 +1656,7 @@ async def test_list_os_policy_assignments_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1793,7 +1793,7 @@ def test_list_os_policy_assignments_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, os_policy_assignments.OSPolicyAssignment) for i in results @@ -2053,7 +2053,7 @@ def test_list_os_policy_assignment_revisions_field_headers(): # a field header. Set these to a non-empty value. request = os_policy_assignments.ListOSPolicyAssignmentRevisionsRequest() - 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 @@ def test_list_os_policy_assignment_revisions_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2087,7 +2087,7 @@ async def test_list_os_policy_assignment_revisions_field_headers_async(): # a field header. Set these to a non-empty value. request = os_policy_assignments.ListOSPolicyAssignmentRevisionsRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2107,7 +2107,7 @@ async def test_list_os_policy_assignment_revisions_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2248,7 +2248,7 @@ def test_list_os_policy_assignment_revisions_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, os_policy_assignments.OSPolicyAssignment) for i in results @@ -2500,7 +2500,7 @@ def test_delete_os_policy_assignment_field_headers(): # a field header. Set these to a non-empty value. request = os_policy_assignments.DeleteOSPolicyAssignmentRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2518,7 +2518,7 @@ def test_delete_os_policy_assignment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2532,7 +2532,7 @@ async def test_delete_os_policy_assignment_field_headers_async(): # a field header. Set these to a non-empty value. request = os_policy_assignments.DeleteOSPolicyAssignmentRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2552,7 +2552,7 @@ async def test_delete_os_policy_assignment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2765,7 +2765,7 @@ def test_get_os_policy_assignment_report_field_headers(): # a field header. Set these to a non-empty value. request = os_policy_assignment_reports.GetOSPolicyAssignmentReportRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2783,7 +2783,7 @@ def test_get_os_policy_assignment_report_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2797,7 +2797,7 @@ async def test_get_os_policy_assignment_report_field_headers_async(): # a field header. Set these to a non-empty value. request = os_policy_assignment_reports.GetOSPolicyAssignmentReportRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2817,7 +2817,7 @@ async def test_get_os_policy_assignment_report_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3023,7 +3023,7 @@ def test_list_os_policy_assignment_reports_field_headers(): # a field header. Set these to a non-empty value. request = os_policy_assignment_reports.ListOSPolicyAssignmentReportsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3043,7 +3043,7 @@ def test_list_os_policy_assignment_reports_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3057,7 +3057,7 @@ async def test_list_os_policy_assignment_reports_field_headers_async(): # a field header. Set these to a non-empty value. request = os_policy_assignment_reports.ListOSPolicyAssignmentReportsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3077,7 +3077,7 @@ async def test_list_os_policy_assignment_reports_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3218,7 +3218,7 @@ def test_list_os_policy_assignment_reports_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, os_policy_assignment_reports.OSPolicyAssignmentReport) @@ -3471,7 +3471,7 @@ def test_get_inventory_field_headers(): # a field header. Set these to a non-empty value. request = inventory.GetInventoryRequest() - 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_inventory), "__call__") as call: @@ -3487,7 +3487,7 @@ def test_get_inventory_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3501,7 +3501,7 @@ async def test_get_inventory_field_headers_async(): # a field header. Set these to a non-empty value. request = inventory.GetInventoryRequest() - 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_inventory), "__call__") as call: @@ -3517,7 +3517,7 @@ async def test_get_inventory_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3699,7 +3699,7 @@ def test_list_inventories_field_headers(): # a field header. Set these to a non-empty value. request = inventory.ListInventoriesRequest() - 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_inventories), "__call__") as call: @@ -3715,7 +3715,7 @@ def test_list_inventories_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3729,7 +3729,7 @@ async def test_list_inventories_field_headers_async(): # a field header. Set these to a non-empty value. request = inventory.ListInventoriesRequest() - 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_inventories), "__call__") as call: @@ -3747,7 +3747,7 @@ async def test_list_inventories_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3878,7 +3878,7 @@ def test_list_inventories_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, inventory.Inventory) for i in results) @@ -4126,7 +4126,7 @@ def test_get_vulnerability_report_field_headers(): # a field header. Set these to a non-empty value. request = vulnerability.GetVulnerabilityReportRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4144,7 +4144,7 @@ def test_get_vulnerability_report_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4158,7 +4158,7 @@ async def test_get_vulnerability_report_field_headers_async(): # a field header. Set these to a non-empty value. request = vulnerability.GetVulnerabilityReportRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4178,7 +4178,7 @@ async def test_get_vulnerability_report_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4373,7 +4373,7 @@ def test_list_vulnerability_reports_field_headers(): # a field header. Set these to a non-empty value. request = vulnerability.ListVulnerabilityReportsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4391,7 +4391,7 @@ def test_list_vulnerability_reports_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -4405,7 +4405,7 @@ async def test_list_vulnerability_reports_field_headers_async(): # a field header. Set these to a non-empty value. request = vulnerability.ListVulnerabilityReportsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4425,7 +4425,7 @@ async def test_list_vulnerability_reports_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -4562,7 +4562,7 @@ def test_list_vulnerability_reports_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, vulnerability.VulnerabilityReport) for i in results) diff --git a/packages/google-cloud-os-config/tests/unit/gapic/osconfig_v1alpha/test_os_config_zonal_service.py b/packages/google-cloud-os-config/tests/unit/gapic/osconfig_v1alpha/test_os_config_zonal_service.py index ca4c599ef79d..1c02cec02f04 100644 --- a/packages/google-cloud-os-config/tests/unit/gapic/osconfig_v1alpha/test_os_config_zonal_service.py +++ b/packages/google-cloud-os-config/tests/unit/gapic/osconfig_v1alpha/test_os_config_zonal_service.py @@ -787,7 +787,7 @@ def test_create_os_policy_assignment_field_headers(): # a field header. Set these to a non-empty value. request = os_policy_assignments.CreateOSPolicyAssignmentRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -805,7 +805,7 @@ def test_create_os_policy_assignment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -819,7 +819,7 @@ async def test_create_os_policy_assignment_field_headers_async(): # a field header. Set these to a non-empty value. request = os_policy_assignments.CreateOSPolicyAssignmentRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -839,7 +839,7 @@ async def test_create_os_policy_assignment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1056,7 +1056,7 @@ def test_update_os_policy_assignment_field_headers(): # a field header. Set these to a non-empty value. request = os_policy_assignments.UpdateOSPolicyAssignmentRequest() - request.os_policy_assignment.name = "os_policy_assignment.name/value" + request.os_policy_assignment.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1074,7 +1074,7 @@ def test_update_os_policy_assignment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "os_policy_assignment.name=os_policy_assignment.name/value", + "os_policy_assignment.name=name_value", ) in kw["metadata"] @@ -1088,7 +1088,7 @@ async def test_update_os_policy_assignment_field_headers_async(): # a field header. Set these to a non-empty value. request = os_policy_assignments.UpdateOSPolicyAssignmentRequest() - request.os_policy_assignment.name = "os_policy_assignment.name/value" + request.os_policy_assignment.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1108,7 +1108,7 @@ async def test_update_os_policy_assignment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "os_policy_assignment.name=os_policy_assignment.name/value", + "os_policy_assignment.name=name_value", ) in kw["metadata"] @@ -1359,7 +1359,7 @@ def test_get_os_policy_assignment_field_headers(): # a field header. Set these to a non-empty value. request = os_policy_assignments.GetOSPolicyAssignmentRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1377,7 +1377,7 @@ def test_get_os_policy_assignment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1391,7 +1391,7 @@ async def test_get_os_policy_assignment_field_headers_async(): # a field header. Set these to a non-empty value. request = os_policy_assignments.GetOSPolicyAssignmentRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1411,7 +1411,7 @@ async def test_get_os_policy_assignment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1606,7 +1606,7 @@ def test_list_os_policy_assignments_field_headers(): # a field header. Set these to a non-empty value. request = os_policy_assignments.ListOSPolicyAssignmentsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1624,7 +1624,7 @@ def test_list_os_policy_assignments_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1638,7 +1638,7 @@ async def test_list_os_policy_assignments_field_headers_async(): # a field header. Set these to a non-empty value. request = os_policy_assignments.ListOSPolicyAssignmentsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1658,7 +1658,7 @@ async def test_list_os_policy_assignments_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1795,7 +1795,7 @@ def test_list_os_policy_assignments_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, os_policy_assignments.OSPolicyAssignment) for i in results @@ -2055,7 +2055,7 @@ def test_list_os_policy_assignment_revisions_field_headers(): # a field header. Set these to a non-empty value. request = os_policy_assignments.ListOSPolicyAssignmentRevisionsRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2075,7 +2075,7 @@ def test_list_os_policy_assignment_revisions_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2089,7 +2089,7 @@ async def test_list_os_policy_assignment_revisions_field_headers_async(): # a field header. Set these to a non-empty value. request = os_policy_assignments.ListOSPolicyAssignmentRevisionsRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2109,7 +2109,7 @@ async def test_list_os_policy_assignment_revisions_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2250,7 +2250,7 @@ def test_list_os_policy_assignment_revisions_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, os_policy_assignments.OSPolicyAssignment) for i in results @@ -2502,7 +2502,7 @@ def test_delete_os_policy_assignment_field_headers(): # a field header. Set these to a non-empty value. request = os_policy_assignments.DeleteOSPolicyAssignmentRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2520,7 +2520,7 @@ def test_delete_os_policy_assignment_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2534,7 +2534,7 @@ async def test_delete_os_policy_assignment_field_headers_async(): # a field header. Set these to a non-empty value. request = os_policy_assignments.DeleteOSPolicyAssignmentRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2554,7 +2554,7 @@ async def test_delete_os_policy_assignment_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2784,7 +2784,7 @@ def test_get_instance_os_policies_compliance_field_headers(): # a field header. Set these to a non-empty value. request = instance_os_policies_compliance.GetInstanceOSPoliciesComplianceRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2804,7 +2804,7 @@ def test_get_instance_os_policies_compliance_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2818,7 +2818,7 @@ async def test_get_instance_os_policies_compliance_field_headers_async(): # a field header. Set these to a non-empty value. request = instance_os_policies_compliance.GetInstanceOSPoliciesComplianceRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2838,7 +2838,7 @@ async def test_get_instance_os_policies_compliance_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3048,7 +3048,7 @@ def test_list_instance_os_policies_compliances_field_headers(): # a field header. Set these to a non-empty value. request = instance_os_policies_compliance.ListInstanceOSPoliciesCompliancesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3068,7 +3068,7 @@ def test_list_instance_os_policies_compliances_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3082,7 +3082,7 @@ async def test_list_instance_os_policies_compliances_field_headers_async(): # a field header. Set these to a non-empty value. request = instance_os_policies_compliance.ListInstanceOSPoliciesCompliancesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3102,7 +3102,7 @@ async def test_list_instance_os_policies_compliances_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3243,7 +3243,7 @@ def test_list_instance_os_policies_compliances_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, instance_os_policies_compliance.InstanceOSPoliciesCompliance) @@ -3521,7 +3521,7 @@ def test_get_os_policy_assignment_report_field_headers(): # a field header. Set these to a non-empty value. request = os_policy_assignment_reports.GetOSPolicyAssignmentReportRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3539,7 +3539,7 @@ def test_get_os_policy_assignment_report_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3553,7 +3553,7 @@ async def test_get_os_policy_assignment_report_field_headers_async(): # a field header. Set these to a non-empty value. request = os_policy_assignment_reports.GetOSPolicyAssignmentReportRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3573,7 +3573,7 @@ async def test_get_os_policy_assignment_report_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3779,7 +3779,7 @@ def test_list_os_policy_assignment_reports_field_headers(): # a field header. Set these to a non-empty value. request = os_policy_assignment_reports.ListOSPolicyAssignmentReportsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3799,7 +3799,7 @@ def test_list_os_policy_assignment_reports_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3813,7 +3813,7 @@ async def test_list_os_policy_assignment_reports_field_headers_async(): # a field header. Set these to a non-empty value. request = os_policy_assignment_reports.ListOSPolicyAssignmentReportsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3833,7 +3833,7 @@ async def test_list_os_policy_assignment_reports_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3974,7 +3974,7 @@ def test_list_os_policy_assignment_reports_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, os_policy_assignment_reports.OSPolicyAssignmentReport) @@ -4227,7 +4227,7 @@ def test_get_inventory_field_headers(): # a field header. Set these to a non-empty value. request = inventory.GetInventoryRequest() - 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_inventory), "__call__") as call: @@ -4243,7 +4243,7 @@ def test_get_inventory_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4257,7 +4257,7 @@ async def test_get_inventory_field_headers_async(): # a field header. Set these to a non-empty value. request = inventory.GetInventoryRequest() - 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_inventory), "__call__") as call: @@ -4273,7 +4273,7 @@ async def test_get_inventory_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4455,7 +4455,7 @@ def test_list_inventories_field_headers(): # a field header. Set these to a non-empty value. request = inventory.ListInventoriesRequest() - 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_inventories), "__call__") as call: @@ -4471,7 +4471,7 @@ def test_list_inventories_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -4485,7 +4485,7 @@ async def test_list_inventories_field_headers_async(): # a field header. Set these to a non-empty value. request = inventory.ListInventoriesRequest() - 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_inventories), "__call__") as call: @@ -4503,7 +4503,7 @@ async def test_list_inventories_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -4634,7 +4634,7 @@ def test_list_inventories_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, inventory.Inventory) for i in results) @@ -4882,7 +4882,7 @@ def test_get_vulnerability_report_field_headers(): # a field header. Set these to a non-empty value. request = vulnerability.GetVulnerabilityReportRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4900,7 +4900,7 @@ def test_get_vulnerability_report_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4914,7 +4914,7 @@ async def test_get_vulnerability_report_field_headers_async(): # a field header. Set these to a non-empty value. request = vulnerability.GetVulnerabilityReportRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4934,7 +4934,7 @@ async def test_get_vulnerability_report_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -5129,7 +5129,7 @@ def test_list_vulnerability_reports_field_headers(): # a field header. Set these to a non-empty value. request = vulnerability.ListVulnerabilityReportsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5147,7 +5147,7 @@ def test_list_vulnerability_reports_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -5161,7 +5161,7 @@ async def test_list_vulnerability_reports_field_headers_async(): # a field header. Set these to a non-empty value. request = vulnerability.ListVulnerabilityReportsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5181,7 +5181,7 @@ async def test_list_vulnerability_reports_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -5318,7 +5318,7 @@ def test_list_vulnerability_reports_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, vulnerability.VulnerabilityReport) for i in results)