diff --git a/packages/google-cloud-bigquery-migration/google/cloud/bigquery_migration_v2/services/migration_service/async_client.py b/packages/google-cloud-bigquery-migration/google/cloud/bigquery_migration_v2/services/migration_service/async_client.py index 060627e9a1be..e73563d2f8ae 100644 --- a/packages/google-cloud-bigquery-migration/google/cloud/bigquery_migration_v2/services/migration_service/async_client.py +++ b/packages/google-cloud-bigquery-migration/google/cloud/bigquery_migration_v2/services/migration_service/async_client.py @@ -235,9 +235,9 @@ async def create_migration_workflow( from google.cloud import bigquery_migration_v2 - def sample_create_migration_workflow(): + async def sample_create_migration_workflow(): # Create a client - client = bigquery_migration_v2.MigrationServiceClient() + client = bigquery_migration_v2.MigrationServiceAsyncClient() # Initialize request argument(s) request = bigquery_migration_v2.CreateMigrationWorkflowRequest( @@ -245,7 +245,7 @@ def sample_create_migration_workflow(): ) # Make the request - response = client.create_migration_workflow(request=request) + response = await client.create_migration_workflow(request=request) # Handle the response print(response) @@ -341,9 +341,9 @@ async def get_migration_workflow( from google.cloud import bigquery_migration_v2 - def sample_get_migration_workflow(): + async def sample_get_migration_workflow(): # Create a client - client = bigquery_migration_v2.MigrationServiceClient() + client = bigquery_migration_v2.MigrationServiceAsyncClient() # Initialize request argument(s) request = bigquery_migration_v2.GetMigrationWorkflowRequest( @@ -351,7 +351,7 @@ def sample_get_migration_workflow(): ) # Make the request - response = client.get_migration_workflow(request=request) + response = await client.get_migration_workflow(request=request) # Handle the response print(response) @@ -447,9 +447,9 @@ async def list_migration_workflows( from google.cloud import bigquery_migration_v2 - def sample_list_migration_workflows(): + async def sample_list_migration_workflows(): # Create a client - client = bigquery_migration_v2.MigrationServiceClient() + client = bigquery_migration_v2.MigrationServiceAsyncClient() # Initialize request argument(s) request = bigquery_migration_v2.ListMigrationWorkflowsRequest( @@ -460,7 +460,7 @@ def sample_list_migration_workflows(): page_result = client.list_migration_workflows(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -564,9 +564,9 @@ async def delete_migration_workflow( from google.cloud import bigquery_migration_v2 - def sample_delete_migration_workflow(): + async def sample_delete_migration_workflow(): # Create a client - client = bigquery_migration_v2.MigrationServiceClient() + client = bigquery_migration_v2.MigrationServiceAsyncClient() # Initialize request argument(s) request = bigquery_migration_v2.DeleteMigrationWorkflowRequest( @@ -574,7 +574,7 @@ def sample_delete_migration_workflow(): ) # Make the request - client.delete_migration_workflow(request=request) + await client.delete_migration_workflow(request=request) Args: request (Union[google.cloud.bigquery_migration_v2.types.DeleteMigrationWorkflowRequest, dict]): @@ -652,9 +652,9 @@ async def start_migration_workflow( from google.cloud import bigquery_migration_v2 - def sample_start_migration_workflow(): + async def sample_start_migration_workflow(): # Create a client - client = bigquery_migration_v2.MigrationServiceClient() + client = bigquery_migration_v2.MigrationServiceAsyncClient() # Initialize request argument(s) request = bigquery_migration_v2.StartMigrationWorkflowRequest( @@ -662,7 +662,7 @@ def sample_start_migration_workflow(): ) # Make the request - client.start_migration_workflow(request=request) + await client.start_migration_workflow(request=request) Args: request (Union[google.cloud.bigquery_migration_v2.types.StartMigrationWorkflowRequest, dict]): @@ -745,9 +745,9 @@ async def get_migration_subtask( from google.cloud import bigquery_migration_v2 - def sample_get_migration_subtask(): + async def sample_get_migration_subtask(): # Create a client - client = bigquery_migration_v2.MigrationServiceClient() + client = bigquery_migration_v2.MigrationServiceAsyncClient() # Initialize request argument(s) request = bigquery_migration_v2.GetMigrationSubtaskRequest( @@ -755,7 +755,7 @@ def sample_get_migration_subtask(): ) # Make the request - response = client.get_migration_subtask(request=request) + response = await client.get_migration_subtask(request=request) # Handle the response print(response) @@ -845,9 +845,9 @@ async def list_migration_subtasks( from google.cloud import bigquery_migration_v2 - def sample_list_migration_subtasks(): + async def sample_list_migration_subtasks(): # Create a client - client = bigquery_migration_v2.MigrationServiceClient() + client = bigquery_migration_v2.MigrationServiceAsyncClient() # Initialize request argument(s) request = bigquery_migration_v2.ListMigrationSubtasksRequest( @@ -858,7 +858,7 @@ def sample_list_migration_subtasks(): page_result = client.list_migration_subtasks(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-bigquery-migration/google/cloud/bigquery_migration_v2alpha/services/migration_service/async_client.py b/packages/google-cloud-bigquery-migration/google/cloud/bigquery_migration_v2alpha/services/migration_service/async_client.py index 39a6f613ecb5..2bb99221ba6f 100644 --- a/packages/google-cloud-bigquery-migration/google/cloud/bigquery_migration_v2alpha/services/migration_service/async_client.py +++ b/packages/google-cloud-bigquery-migration/google/cloud/bigquery_migration_v2alpha/services/migration_service/async_client.py @@ -235,9 +235,9 @@ async def create_migration_workflow( from google.cloud import bigquery_migration_v2alpha - def sample_create_migration_workflow(): + async def sample_create_migration_workflow(): # Create a client - client = bigquery_migration_v2alpha.MigrationServiceClient() + client = bigquery_migration_v2alpha.MigrationServiceAsyncClient() # Initialize request argument(s) request = bigquery_migration_v2alpha.CreateMigrationWorkflowRequest( @@ -245,7 +245,7 @@ def sample_create_migration_workflow(): ) # Make the request - response = client.create_migration_workflow(request=request) + response = await client.create_migration_workflow(request=request) # Handle the response print(response) @@ -341,9 +341,9 @@ async def get_migration_workflow( from google.cloud import bigquery_migration_v2alpha - def sample_get_migration_workflow(): + async def sample_get_migration_workflow(): # Create a client - client = bigquery_migration_v2alpha.MigrationServiceClient() + client = bigquery_migration_v2alpha.MigrationServiceAsyncClient() # Initialize request argument(s) request = bigquery_migration_v2alpha.GetMigrationWorkflowRequest( @@ -351,7 +351,7 @@ def sample_get_migration_workflow(): ) # Make the request - response = client.get_migration_workflow(request=request) + response = await client.get_migration_workflow(request=request) # Handle the response print(response) @@ -447,9 +447,9 @@ async def list_migration_workflows( from google.cloud import bigquery_migration_v2alpha - def sample_list_migration_workflows(): + async def sample_list_migration_workflows(): # Create a client - client = bigquery_migration_v2alpha.MigrationServiceClient() + client = bigquery_migration_v2alpha.MigrationServiceAsyncClient() # Initialize request argument(s) request = bigquery_migration_v2alpha.ListMigrationWorkflowsRequest( @@ -460,7 +460,7 @@ def sample_list_migration_workflows(): page_result = client.list_migration_workflows(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -564,9 +564,9 @@ async def delete_migration_workflow( from google.cloud import bigquery_migration_v2alpha - def sample_delete_migration_workflow(): + async def sample_delete_migration_workflow(): # Create a client - client = bigquery_migration_v2alpha.MigrationServiceClient() + client = bigquery_migration_v2alpha.MigrationServiceAsyncClient() # Initialize request argument(s) request = bigquery_migration_v2alpha.DeleteMigrationWorkflowRequest( @@ -574,7 +574,7 @@ def sample_delete_migration_workflow(): ) # Make the request - client.delete_migration_workflow(request=request) + await client.delete_migration_workflow(request=request) Args: request (Union[google.cloud.bigquery_migration_v2alpha.types.DeleteMigrationWorkflowRequest, dict]): @@ -652,9 +652,9 @@ async def start_migration_workflow( from google.cloud import bigquery_migration_v2alpha - def sample_start_migration_workflow(): + async def sample_start_migration_workflow(): # Create a client - client = bigquery_migration_v2alpha.MigrationServiceClient() + client = bigquery_migration_v2alpha.MigrationServiceAsyncClient() # Initialize request argument(s) request = bigquery_migration_v2alpha.StartMigrationWorkflowRequest( @@ -662,7 +662,7 @@ def sample_start_migration_workflow(): ) # Make the request - client.start_migration_workflow(request=request) + await client.start_migration_workflow(request=request) Args: request (Union[google.cloud.bigquery_migration_v2alpha.types.StartMigrationWorkflowRequest, dict]): @@ -745,9 +745,9 @@ async def get_migration_subtask( from google.cloud import bigquery_migration_v2alpha - def sample_get_migration_subtask(): + async def sample_get_migration_subtask(): # Create a client - client = bigquery_migration_v2alpha.MigrationServiceClient() + client = bigquery_migration_v2alpha.MigrationServiceAsyncClient() # Initialize request argument(s) request = bigquery_migration_v2alpha.GetMigrationSubtaskRequest( @@ -755,7 +755,7 @@ def sample_get_migration_subtask(): ) # Make the request - response = client.get_migration_subtask(request=request) + response = await client.get_migration_subtask(request=request) # Handle the response print(response) @@ -854,9 +854,9 @@ async def list_migration_subtasks( from google.cloud import bigquery_migration_v2alpha - def sample_list_migration_subtasks(): + async def sample_list_migration_subtasks(): # Create a client - client = bigquery_migration_v2alpha.MigrationServiceClient() + client = bigquery_migration_v2alpha.MigrationServiceAsyncClient() # Initialize request argument(s) request = bigquery_migration_v2alpha.ListMigrationSubtasksRequest( @@ -867,7 +867,7 @@ def sample_list_migration_subtasks(): page_result = client.list_migration_subtasks(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-bigquery-migration/tests/unit/gapic/bigquery_migration_v2/test_migration_service.py b/packages/google-cloud-bigquery-migration/tests/unit/gapic/bigquery_migration_v2/test_migration_service.py index c68e4e86c810..33cec522a0bc 100644 --- a/packages/google-cloud-bigquery-migration/tests/unit/gapic/bigquery_migration_v2/test_migration_service.py +++ b/packages/google-cloud-bigquery-migration/tests/unit/gapic/bigquery_migration_v2/test_migration_service.py @@ -780,7 +780,7 @@ def test_create_migration_workflow_field_headers(): # a field header. Set these to a non-empty value. request = migration_service.CreateMigrationWorkflowRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -798,7 +798,7 @@ def test_create_migration_workflow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -812,7 +812,7 @@ async def test_create_migration_workflow_field_headers_async(): # a field header. Set these to a non-empty value. request = migration_service.CreateMigrationWorkflowRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -832,7 +832,7 @@ async def test_create_migration_workflow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1045,7 +1045,7 @@ def test_get_migration_workflow_field_headers(): # a field header. Set these to a non-empty value. request = migration_service.GetMigrationWorkflowRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1063,7 +1063,7 @@ def test_get_migration_workflow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1077,7 +1077,7 @@ async def test_get_migration_workflow_field_headers_async(): # a field header. Set these to a non-empty value. request = migration_service.GetMigrationWorkflowRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1097,7 +1097,7 @@ async def test_get_migration_workflow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1292,7 +1292,7 @@ def test_list_migration_workflows_field_headers(): # a field header. Set these to a non-empty value. request = migration_service.ListMigrationWorkflowsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1310,7 +1310,7 @@ def test_list_migration_workflows_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1324,7 +1324,7 @@ async def test_list_migration_workflows_field_headers_async(): # a field header. Set these to a non-empty value. request = migration_service.ListMigrationWorkflowsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1344,7 +1344,7 @@ async def test_list_migration_workflows_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1481,7 +1481,7 @@ def test_list_migration_workflows_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, migration_entities.MigrationWorkflow) for i in results) @@ -1729,7 +1729,7 @@ def test_delete_migration_workflow_field_headers(): # a field header. Set these to a non-empty value. request = migration_service.DeleteMigrationWorkflowRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1747,7 +1747,7 @@ def test_delete_migration_workflow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1761,7 +1761,7 @@ async def test_delete_migration_workflow_field_headers_async(): # a field header. Set these to a non-empty value. request = migration_service.DeleteMigrationWorkflowRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1779,7 +1779,7 @@ async def test_delete_migration_workflow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1964,7 +1964,7 @@ def test_start_migration_workflow_field_headers(): # a field header. Set these to a non-empty value. request = migration_service.StartMigrationWorkflowRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1982,7 +1982,7 @@ def test_start_migration_workflow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1996,7 +1996,7 @@ async def test_start_migration_workflow_field_headers_async(): # a field header. Set these to a non-empty value. request = migration_service.StartMigrationWorkflowRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2014,7 +2014,7 @@ async def test_start_migration_workflow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2223,7 +2223,7 @@ def test_get_migration_subtask_field_headers(): # a field header. Set these to a non-empty value. request = migration_service.GetMigrationSubtaskRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2241,7 +2241,7 @@ def test_get_migration_subtask_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2255,7 +2255,7 @@ async def test_get_migration_subtask_field_headers_async(): # a field header. Set these to a non-empty value. request = migration_service.GetMigrationSubtaskRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2275,7 +2275,7 @@ async def test_get_migration_subtask_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2470,7 +2470,7 @@ def test_list_migration_subtasks_field_headers(): # a field header. Set these to a non-empty value. request = migration_service.ListMigrationSubtasksRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2488,7 +2488,7 @@ def test_list_migration_subtasks_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2502,7 +2502,7 @@ async def test_list_migration_subtasks_field_headers_async(): # a field header. Set these to a non-empty value. request = migration_service.ListMigrationSubtasksRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2522,7 +2522,7 @@ async def test_list_migration_subtasks_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2659,7 +2659,7 @@ def test_list_migration_subtasks_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, migration_entities.MigrationSubtask) for i in results) diff --git a/packages/google-cloud-bigquery-migration/tests/unit/gapic/bigquery_migration_v2alpha/test_migration_service.py b/packages/google-cloud-bigquery-migration/tests/unit/gapic/bigquery_migration_v2alpha/test_migration_service.py index bb22bbbbeb63..59b17f605c6a 100644 --- a/packages/google-cloud-bigquery-migration/tests/unit/gapic/bigquery_migration_v2alpha/test_migration_service.py +++ b/packages/google-cloud-bigquery-migration/tests/unit/gapic/bigquery_migration_v2alpha/test_migration_service.py @@ -782,7 +782,7 @@ def test_create_migration_workflow_field_headers(): # a field header. Set these to a non-empty value. request = migration_service.CreateMigrationWorkflowRequest() - 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 @@ def test_create_migration_workflow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -814,7 +814,7 @@ async def test_create_migration_workflow_field_headers_async(): # a field header. Set these to a non-empty value. request = migration_service.CreateMigrationWorkflowRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -834,7 +834,7 @@ async def test_create_migration_workflow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1047,7 +1047,7 @@ def test_get_migration_workflow_field_headers(): # a field header. Set these to a non-empty value. request = migration_service.GetMigrationWorkflowRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1065,7 +1065,7 @@ def test_get_migration_workflow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1079,7 +1079,7 @@ async def test_get_migration_workflow_field_headers_async(): # a field header. Set these to a non-empty value. request = migration_service.GetMigrationWorkflowRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1099,7 +1099,7 @@ async def test_get_migration_workflow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1294,7 +1294,7 @@ def test_list_migration_workflows_field_headers(): # a field header. Set these to a non-empty value. request = migration_service.ListMigrationWorkflowsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1312,7 +1312,7 @@ def test_list_migration_workflows_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1326,7 +1326,7 @@ async def test_list_migration_workflows_field_headers_async(): # a field header. Set these to a non-empty value. request = migration_service.ListMigrationWorkflowsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1346,7 +1346,7 @@ async def test_list_migration_workflows_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1483,7 +1483,7 @@ def test_list_migration_workflows_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, migration_entities.MigrationWorkflow) for i in results) @@ -1731,7 +1731,7 @@ def test_delete_migration_workflow_field_headers(): # a field header. Set these to a non-empty value. request = migration_service.DeleteMigrationWorkflowRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1749,7 +1749,7 @@ def test_delete_migration_workflow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1763,7 +1763,7 @@ async def test_delete_migration_workflow_field_headers_async(): # a field header. Set these to a non-empty value. request = migration_service.DeleteMigrationWorkflowRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1781,7 +1781,7 @@ async def test_delete_migration_workflow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1966,7 +1966,7 @@ def test_start_migration_workflow_field_headers(): # a field header. Set these to a non-empty value. request = migration_service.StartMigrationWorkflowRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1984,7 +1984,7 @@ def test_start_migration_workflow_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1998,7 +1998,7 @@ async def test_start_migration_workflow_field_headers_async(): # a field header. Set these to a non-empty value. request = migration_service.StartMigrationWorkflowRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2016,7 +2016,7 @@ async def test_start_migration_workflow_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2225,7 +2225,7 @@ def test_get_migration_subtask_field_headers(): # a field header. Set these to a non-empty value. request = migration_service.GetMigrationSubtaskRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2243,7 +2243,7 @@ def test_get_migration_subtask_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2257,7 +2257,7 @@ async def test_get_migration_subtask_field_headers_async(): # a field header. Set these to a non-empty value. request = migration_service.GetMigrationSubtaskRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2277,7 +2277,7 @@ async def test_get_migration_subtask_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2472,7 +2472,7 @@ def test_list_migration_subtasks_field_headers(): # a field header. Set these to a non-empty value. request = migration_service.ListMigrationSubtasksRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2490,7 +2490,7 @@ def test_list_migration_subtasks_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2504,7 +2504,7 @@ async def test_list_migration_subtasks_field_headers_async(): # a field header. Set these to a non-empty value. request = migration_service.ListMigrationSubtasksRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2524,7 +2524,7 @@ async def test_list_migration_subtasks_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2661,7 +2661,7 @@ def test_list_migration_subtasks_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, migration_entities.MigrationSubtask) for i in results)