diff --git a/google/cloud/documentai_v1/services/document_processor_service/async_client.py b/google/cloud/documentai_v1/services/document_processor_service/async_client.py index 178f0ebb..de3c45ed 100644 --- a/google/cloud/documentai_v1/services/document_processor_service/async_client.py +++ b/google/cloud/documentai_v1/services/document_processor_service/async_client.py @@ -238,9 +238,9 @@ async def process_document( from google.cloud import documentai_v1 - def sample_process_document(): + async def sample_process_document(): # Create a client - client = documentai_v1.DocumentProcessorServiceClient() + client = documentai_v1.DocumentProcessorServiceAsyncClient() # Initialize request argument(s) inline_document = documentai_v1.Document() @@ -252,7 +252,7 @@ def sample_process_document(): ) # Make the request - response = client.process_document(request=request) + response = await client.process_document(request=request) # Handle the response print(response) @@ -348,9 +348,9 @@ async def batch_process_documents( from google.cloud import documentai_v1 - def sample_batch_process_documents(): + async def sample_batch_process_documents(): # Create a client - client = documentai_v1.DocumentProcessorServiceClient() + client = documentai_v1.DocumentProcessorServiceAsyncClient() # Initialize request argument(s) request = documentai_v1.BatchProcessRequest( @@ -362,7 +362,7 @@ def sample_batch_process_documents(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -469,9 +469,9 @@ async def review_document( from google.cloud import documentai_v1 - def sample_review_document(): + async def sample_review_document(): # Create a client - client = documentai_v1.DocumentProcessorServiceClient() + client = documentai_v1.DocumentProcessorServiceAsyncClient() # Initialize request argument(s) inline_document = documentai_v1.Document() @@ -487,7 +487,7 @@ def sample_review_document(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) diff --git a/google/cloud/documentai_v1/types/document.py b/google/cloud/documentai_v1/types/document.py index 25b2cc21..5aa2a42e 100644 --- a/google/cloud/documentai_v1/types/document.py +++ b/google/cloud/documentai_v1/types/document.py @@ -875,7 +875,7 @@ class Entity(proto.Message): into the [Document.text][google.cloud.documentai.v1.Document.text]. type_ (str): - Entity type from a schema e.g. ``Address``. + Required. Entity type from a schema e.g. ``Address``. mention_text (str): Optional. Text value in the document e.g. ``1600 Amphitheatre Pkwy``. If the entity is not present in diff --git a/google/cloud/documentai_v1beta2/services/document_understanding_service/async_client.py b/google/cloud/documentai_v1beta2/services/document_understanding_service/async_client.py index 7a59f55b..9dd7fc49 100644 --- a/google/cloud/documentai_v1beta2/services/document_understanding_service/async_client.py +++ b/google/cloud/documentai_v1beta2/services/document_understanding_service/async_client.py @@ -232,9 +232,9 @@ async def batch_process_documents( from google.cloud import documentai_v1beta2 - def sample_batch_process_documents(): + async def sample_batch_process_documents(): # Create a client - client = documentai_v1beta2.DocumentUnderstandingServiceClient() + client = documentai_v1beta2.DocumentUnderstandingServiceAsyncClient() # Initialize request argument(s) requests = documentai_v1beta2.ProcessDocumentRequest() @@ -250,7 +250,7 @@ def sample_batch_process_documents(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -355,9 +355,9 @@ async def process_document( from google.cloud import documentai_v1beta2 - def sample_process_document(): + async def sample_process_document(): # Create a client - client = documentai_v1beta2.DocumentUnderstandingServiceClient() + client = documentai_v1beta2.DocumentUnderstandingServiceAsyncClient() # Initialize request argument(s) input_config = documentai_v1beta2.InputConfig() @@ -369,7 +369,7 @@ def sample_process_document(): ) # Make the request - response = client.process_document(request=request) + response = await client.process_document(request=request) # Handle the response print(response) diff --git a/google/cloud/documentai_v1beta2/types/document.py b/google/cloud/documentai_v1beta2/types/document.py index 4a10f97f..92e50574 100644 --- a/google/cloud/documentai_v1beta2/types/document.py +++ b/google/cloud/documentai_v1beta2/types/document.py @@ -773,7 +773,7 @@ class Entity(proto.Message): Provenance of the entity. Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text]. type_ (str): - Entity type from a schema e.g. ``Address``. + Required. Entity type from a schema e.g. ``Address``. mention_text (str): Text value in the document e.g. ``1600 Amphitheatre Pkwy``. mention_id (str): @@ -788,11 +788,6 @@ class Entity(proto.Message): id (str): Optional. Canonical id. This will be a unique value in the entity list for this document. - bounding_poly_for_demo_frontend (google.cloud.documentai_v1beta2.types.BoundingPoly): - Optional. Temporary field to store the - bounding poly for short-term POCs. Used by the - frontend only. Do not use before you talk to - ybo@ and lukasr@. """ text_anchor = proto.Field( @@ -825,11 +820,6 @@ class Entity(proto.Message): proto.STRING, number=7, ) - bounding_poly_for_demo_frontend = proto.Field( - proto.MESSAGE, - number=8, - message=geometry.BoundingPoly, - ) class EntityRelation(proto.Message): r"""Relationship between diff --git a/google/cloud/documentai_v1beta3/services/document_processor_service/async_client.py b/google/cloud/documentai_v1beta3/services/document_processor_service/async_client.py index e178f44e..2e479598 100644 --- a/google/cloud/documentai_v1beta3/services/document_processor_service/async_client.py +++ b/google/cloud/documentai_v1beta3/services/document_processor_service/async_client.py @@ -250,9 +250,9 @@ async def process_document( from google.cloud import documentai_v1beta3 - def sample_process_document(): + async def sample_process_document(): # Create a client - client = documentai_v1beta3.DocumentProcessorServiceClient() + client = documentai_v1beta3.DocumentProcessorServiceAsyncClient() # Initialize request argument(s) inline_document = documentai_v1beta3.Document() @@ -264,7 +264,7 @@ def sample_process_document(): ) # Make the request - response = client.process_document(request=request) + response = await client.process_document(request=request) # Handle the response print(response) @@ -360,9 +360,9 @@ async def batch_process_documents( from google.cloud import documentai_v1beta3 - def sample_batch_process_documents(): + async def sample_batch_process_documents(): # Create a client - client = documentai_v1beta3.DocumentProcessorServiceClient() + client = documentai_v1beta3.DocumentProcessorServiceAsyncClient() # Initialize request argument(s) request = documentai_v1beta3.BatchProcessRequest( @@ -374,7 +374,7 @@ def sample_batch_process_documents(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -482,9 +482,9 @@ async def fetch_processor_types( from google.cloud import documentai_v1beta3 - def sample_fetch_processor_types(): + async def sample_fetch_processor_types(): # Create a client - client = documentai_v1beta3.DocumentProcessorServiceClient() + client = documentai_v1beta3.DocumentProcessorServiceAsyncClient() # Initialize request argument(s) request = documentai_v1beta3.FetchProcessorTypesRequest( @@ -492,7 +492,7 @@ def sample_fetch_processor_types(): ) # Make the request - response = client.fetch_processor_types(request=request) + response = await client.fetch_processor_types(request=request) # Handle the response print(response) @@ -578,9 +578,9 @@ async def list_processors( from google.cloud import documentai_v1beta3 - def sample_list_processors(): + async def sample_list_processors(): # Create a client - client = documentai_v1beta3.DocumentProcessorServiceClient() + client = documentai_v1beta3.DocumentProcessorServiceAsyncClient() # Initialize request argument(s) request = documentai_v1beta3.ListProcessorsRequest( @@ -591,7 +591,7 @@ def sample_list_processors(): page_result = client.list_processors(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -690,9 +690,9 @@ async def create_processor( from google.cloud import documentai_v1beta3 - def sample_create_processor(): + async def sample_create_processor(): # Create a client - client = documentai_v1beta3.DocumentProcessorServiceClient() + client = documentai_v1beta3.DocumentProcessorServiceAsyncClient() # Initialize request argument(s) request = documentai_v1beta3.CreateProcessorRequest( @@ -700,7 +700,7 @@ def sample_create_processor(): ) # Make the request - response = client.create_processor(request=request) + response = await client.create_processor(request=request) # Handle the response print(response) @@ -803,9 +803,9 @@ async def delete_processor( from google.cloud import documentai_v1beta3 - def sample_delete_processor(): + async def sample_delete_processor(): # Create a client - client = documentai_v1beta3.DocumentProcessorServiceClient() + client = documentai_v1beta3.DocumentProcessorServiceAsyncClient() # Initialize request argument(s) request = documentai_v1beta3.DeleteProcessorRequest( @@ -817,7 +817,7 @@ def sample_delete_processor(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -922,9 +922,9 @@ async def enable_processor( from google.cloud import documentai_v1beta3 - def sample_enable_processor(): + async def sample_enable_processor(): # Create a client - client = documentai_v1beta3.DocumentProcessorServiceClient() + client = documentai_v1beta3.DocumentProcessorServiceAsyncClient() # Initialize request argument(s) request = documentai_v1beta3.EnableProcessorRequest( @@ -936,7 +936,7 @@ def sample_enable_processor(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1010,9 +1010,9 @@ async def disable_processor( from google.cloud import documentai_v1beta3 - def sample_disable_processor(): + async def sample_disable_processor(): # Create a client - client = documentai_v1beta3.DocumentProcessorServiceClient() + client = documentai_v1beta3.DocumentProcessorServiceAsyncClient() # Initialize request argument(s) request = documentai_v1beta3.DisableProcessorRequest( @@ -1024,7 +1024,7 @@ def sample_disable_processor(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1100,9 +1100,9 @@ async def review_document( from google.cloud import documentai_v1beta3 - def sample_review_document(): + async def sample_review_document(): # Create a client - client = documentai_v1beta3.DocumentProcessorServiceClient() + client = documentai_v1beta3.DocumentProcessorServiceAsyncClient() # Initialize request argument(s) inline_document = documentai_v1beta3.Document() @@ -1118,7 +1118,7 @@ def sample_review_document(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) diff --git a/google/cloud/documentai_v1beta3/types/document.py b/google/cloud/documentai_v1beta3/types/document.py index b7d0a56d..f945df4a 100644 --- a/google/cloud/documentai_v1beta3/types/document.py +++ b/google/cloud/documentai_v1beta3/types/document.py @@ -880,7 +880,7 @@ class Entity(proto.Message): into the [Document.text][google.cloud.documentai.v1beta3.Document.text]. type_ (str): - Entity type from a schema e.g. ``Address``. + Required. Entity type from a schema e.g. ``Address``. mention_text (str): Optional. Text value in the document e.g. ``1600 Amphitheatre Pkwy``. If the entity is not present in diff --git a/tests/unit/gapic/documentai_v1/test_document_processor_service.py b/tests/unit/gapic/documentai_v1/test_document_processor_service.py index 500f5a4b..82d570f2 100644 --- a/tests/unit/gapic/documentai_v1/test_document_processor_service.py +++ b/tests/unit/gapic/documentai_v1/test_document_processor_service.py @@ -790,7 +790,7 @@ def test_process_document_field_headers(): # a field header. Set these to a non-empty value. request = document_processor_service.ProcessRequest() - 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.process_document), "__call__") as call: @@ -806,7 +806,7 @@ def test_process_document_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -820,7 +820,7 @@ async def test_process_document_field_headers_async(): # a field header. Set these to a non-empty value. request = document_processor_service.ProcessRequest() - 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.process_document), "__call__") as call: @@ -838,7 +838,7 @@ async def test_process_document_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1023,7 +1023,7 @@ def test_batch_process_documents_field_headers(): # a field header. Set these to a non-empty value. request = document_processor_service.BatchProcessRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1041,7 +1041,7 @@ def test_batch_process_documents_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1055,7 +1055,7 @@ async def test_batch_process_documents_field_headers_async(): # a field header. Set these to a non-empty value. request = document_processor_service.BatchProcessRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1075,7 +1075,7 @@ async def test_batch_process_documents_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1258,7 +1258,7 @@ def test_review_document_field_headers(): # a field header. Set these to a non-empty value. request = document_processor_service.ReviewDocumentRequest() - request.human_review_config = "human_review_config/value" + request.human_review_config = "human_review_config_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.review_document), "__call__") as call: @@ -1274,7 +1274,7 @@ def test_review_document_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "human_review_config=human_review_config/value", + "human_review_config=human_review_config_value", ) in kw["metadata"] @@ -1288,7 +1288,7 @@ async def test_review_document_field_headers_async(): # a field header. Set these to a non-empty value. request = document_processor_service.ReviewDocumentRequest() - request.human_review_config = "human_review_config/value" + request.human_review_config = "human_review_config_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.review_document), "__call__") as call: @@ -1306,7 +1306,7 @@ async def test_review_document_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "human_review_config=human_review_config/value", + "human_review_config=human_review_config_value", ) in kw["metadata"] diff --git a/tests/unit/gapic/documentai_v1beta2/test_document_understanding_service.py b/tests/unit/gapic/documentai_v1beta2/test_document_understanding_service.py index 119469ce..3acba2d8 100644 --- a/tests/unit/gapic/documentai_v1beta2/test_document_understanding_service.py +++ b/tests/unit/gapic/documentai_v1beta2/test_document_understanding_service.py @@ -788,7 +788,7 @@ def test_batch_process_documents_field_headers(): # a field header. Set these to a non-empty value. request = document_understanding.BatchProcessDocumentsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -806,7 +806,7 @@ def test_batch_process_documents_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -820,7 +820,7 @@ async def test_batch_process_documents_field_headers_async(): # a field header. Set these to a non-empty value. request = document_understanding.BatchProcessDocumentsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -840,7 +840,7 @@ async def test_batch_process_documents_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1046,7 +1046,7 @@ def test_process_document_field_headers(): # a field header. Set these to a non-empty value. request = document_understanding.ProcessDocumentRequest() - 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.process_document), "__call__") as call: @@ -1062,7 +1062,7 @@ def test_process_document_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1076,7 +1076,7 @@ async def test_process_document_field_headers_async(): # a field header. Set these to a non-empty value. request = document_understanding.ProcessDocumentRequest() - 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.process_document), "__call__") as call: @@ -1092,7 +1092,7 @@ async def test_process_document_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] diff --git a/tests/unit/gapic/documentai_v1beta3/test_document_processor_service.py b/tests/unit/gapic/documentai_v1beta3/test_document_processor_service.py index 5126618a..458fc7a9 100644 --- a/tests/unit/gapic/documentai_v1beta3/test_document_processor_service.py +++ b/tests/unit/gapic/documentai_v1beta3/test_document_processor_service.py @@ -800,7 +800,7 @@ def test_process_document_field_headers(): # a field header. Set these to a non-empty value. request = document_processor_service.ProcessRequest() - 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.process_document), "__call__") as call: @@ -816,7 +816,7 @@ def test_process_document_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -830,7 +830,7 @@ async def test_process_document_field_headers_async(): # a field header. Set these to a non-empty value. request = document_processor_service.ProcessRequest() - 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.process_document), "__call__") as call: @@ -848,7 +848,7 @@ async def test_process_document_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1033,7 +1033,7 @@ def test_batch_process_documents_field_headers(): # a field header. Set these to a non-empty value. request = document_processor_service.BatchProcessRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1051,7 +1051,7 @@ def test_batch_process_documents_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1065,7 +1065,7 @@ async def test_batch_process_documents_field_headers_async(): # a field header. Set these to a non-empty value. request = document_processor_service.BatchProcessRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1085,7 +1085,7 @@ async def test_batch_process_documents_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1274,7 +1274,7 @@ def test_fetch_processor_types_field_headers(): # a field header. Set these to a non-empty value. request = document_processor_service.FetchProcessorTypesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1292,7 +1292,7 @@ def test_fetch_processor_types_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1306,7 +1306,7 @@ async def test_fetch_processor_types_field_headers_async(): # a field header. Set these to a non-empty value. request = document_processor_service.FetchProcessorTypesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1326,7 +1326,7 @@ async def test_fetch_processor_types_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1515,7 +1515,7 @@ def test_list_processors_field_headers(): # a field header. Set these to a non-empty value. request = document_processor_service.ListProcessorsRequest() - 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_processors), "__call__") as call: @@ -1531,7 +1531,7 @@ def test_list_processors_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1545,7 +1545,7 @@ async def test_list_processors_field_headers_async(): # a field header. Set these to a non-empty value. request = document_processor_service.ListProcessorsRequest() - 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_processors), "__call__") as call: @@ -1563,7 +1563,7 @@ async def test_list_processors_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1694,7 +1694,7 @@ def test_list_processors_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, processor.Processor) for i in results) @@ -1960,7 +1960,7 @@ def test_create_processor_field_headers(): # a field header. Set these to a non-empty value. request = document_processor_service.CreateProcessorRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_processor), "__call__") as call: @@ -1976,7 +1976,7 @@ def test_create_processor_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1990,7 +1990,7 @@ async def test_create_processor_field_headers_async(): # a field header. Set these to a non-empty value. request = document_processor_service.CreateProcessorRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_processor), "__call__") as call: @@ -2008,7 +2008,7 @@ async def test_create_processor_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2197,7 +2197,7 @@ def test_delete_processor_field_headers(): # a field header. Set these to a non-empty value. request = document_processor_service.DeleteProcessorRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_processor), "__call__") as call: @@ -2213,7 +2213,7 @@ def test_delete_processor_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2227,7 +2227,7 @@ async def test_delete_processor_field_headers_async(): # a field header. Set these to a non-empty value. request = document_processor_service.DeleteProcessorRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_processor), "__call__") as call: @@ -2245,7 +2245,7 @@ async def test_delete_processor_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2424,7 +2424,7 @@ def test_enable_processor_field_headers(): # a field header. Set these to a non-empty value. request = document_processor_service.EnableProcessorRequest() - 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.enable_processor), "__call__") as call: @@ -2440,7 +2440,7 @@ def test_enable_processor_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2454,7 +2454,7 @@ async def test_enable_processor_field_headers_async(): # a field header. Set these to a non-empty value. request = document_processor_service.EnableProcessorRequest() - 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.enable_processor), "__call__") as call: @@ -2472,7 +2472,7 @@ async def test_enable_processor_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2575,7 +2575,7 @@ def test_disable_processor_field_headers(): # a field header. Set these to a non-empty value. request = document_processor_service.DisableProcessorRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2593,7 +2593,7 @@ def test_disable_processor_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2607,7 +2607,7 @@ async def test_disable_processor_field_headers_async(): # a field header. Set these to a non-empty value. request = document_processor_service.DisableProcessorRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2627,7 +2627,7 @@ async def test_disable_processor_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2724,7 +2724,7 @@ def test_review_document_field_headers(): # a field header. Set these to a non-empty value. request = document_processor_service.ReviewDocumentRequest() - request.human_review_config = "human_review_config/value" + request.human_review_config = "human_review_config_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.review_document), "__call__") as call: @@ -2740,7 +2740,7 @@ def test_review_document_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "human_review_config=human_review_config/value", + "human_review_config=human_review_config_value", ) in kw["metadata"] @@ -2754,7 +2754,7 @@ async def test_review_document_field_headers_async(): # a field header. Set these to a non-empty value. request = document_processor_service.ReviewDocumentRequest() - request.human_review_config = "human_review_config/value" + request.human_review_config = "human_review_config_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.review_document), "__call__") as call: @@ -2772,7 +2772,7 @@ async def test_review_document_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "human_review_config=human_review_config/value", + "human_review_config=human_review_config_value", ) in kw["metadata"]