diff --git a/gapic/templates/%namespace/%name_%version/%sub/services/%service/_client_macros.j2 b/gapic/templates/%namespace/%name_%version/%sub/services/%service/_client_macros.j2 index e741d6d047..7eeda037b7 100644 --- a/gapic/templates/%namespace/%name_%version/%sub/services/%service/_client_macros.j2 +++ b/gapic/templates/%namespace/%name_%version/%sub/services/%service/_client_macros.j2 @@ -144,45 +144,7 @@ # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.{{ method.transport_safe_name|snake_case}}] - {% if method.explicit_routing %} - header_params = {} - {% if not method.client_streaming %} - {% for routing_param in method.routing_rule.routing_parameters %} - {% if routing_param.path_template %} {# Need to match. #} - - routing_param_regex = {{ routing_param.to_regex() }} - regex_match = routing_param_regex.match(request.{{ routing_param.field }}) - if regex_match and regex_match.group("{{ routing_param.key }}"): - header_params["{{ routing_param.key }}"] = regex_match.group("{{ routing_param.key }}") - - {% else %} - - if request.{{ routing_param.field }}: - header_params["{{ routing_param.key }}"] = request.{{ routing_param.field }} - - {% endif %} - {% endfor %} {# method.routing_rule.routing_parameters #} - {% endif %} {# if not method.client_streaming #} - - if header_params: - metadata = tuple(metadata) + ( - gapic_v1.routing_header.to_grpc_metadata(header_params), - ) - - {% elif method.field_headers %} {# implicit routing #} - # Certain fields should be provided within the metadata header; - # add these here. - metadata = tuple(metadata) + ( - gapic_v1.routing_header.to_grpc_metadata(( - {% for field_header in method.field_headers %} - {% if not method.client_streaming %} - ("{{ field_header.raw }}", request.{{ field_header.disambiguated }}), - {% endif %} - {% endfor %} - )), - ) - {% endif %} {# method.explicit_routing #} - +{{ shared_macros.create_metadata(method) }} {{ shared_macros.add_api_version_header_to_metadata(service.version) }} {{ shared_macros.auto_populate_uuid4_fields(api, method) }} diff --git a/gapic/templates/%namespace/%name_%version/%sub/services/%service/_shared_macros.j2 b/gapic/templates/%namespace/%name_%version/%sub/services/%service/_shared_macros.j2 index b7b223caad..8fec390957 100644 --- a/gapic/templates/%namespace/%name_%version/%sub/services/%service/_shared_macros.j2 +++ b/gapic/templates/%namespace/%name_%version/%sub/services/%service/_shared_macros.j2 @@ -55,6 +55,47 @@ except ImportError: # pragma: NO COVER {% endif %}{# service_version #} {% endmacro %} +{% macro create_metadata(method) %} + {% if method.explicit_routing %} + header_params = {} + {% if not method.client_streaming %} + {% for routing_param in method.routing_rule.routing_parameters %} + {% if routing_param.path_template %} {# Need to match. #} + + routing_param_regex = {{ routing_param.to_regex() }} + regex_match = routing_param_regex.match(request.{{ routing_param.field }}) + if regex_match and regex_match.group("{{ routing_param.key }}"): + header_params["{{ routing_param.key }}"] = regex_match.group("{{ routing_param.key }}") + + {% else %} + + if request.{{ routing_param.field }}: + header_params["{{ routing_param.key }}"] = request.{{ routing_param.field }} + + {% endif %} + {% endfor %} {# method.routing_rule.routing_parameters #} + {% endif %} {# if not method.client_streaming #} + + if header_params: + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata(header_params), + ) + + {% elif method.field_headers %}{# implicit routing #} + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata(( + {% if not method.client_streaming %} + {% for field_header in method.field_headers %} + ("{{ field_header.raw }}", request.{{ field_header.disambiguated }}), + {% endfor %}{# for field_header in method.field_headers #} + {% endif %}{# not method.client_streaming #} + )), + ) + {% endif %}{# method.explicit_routing #} +{% endmacro %}{# create_metadata #} + {% macro add_api_version_header_to_metadata(service_version) %} {# Add API Version to metadata as per https://github.com/aip-dev/google.aip.dev/pull/1331. diff --git a/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 b/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 index 36a40f4db0..11171569bd 100644 --- a/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 +++ b/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 @@ -364,20 +364,7 @@ class {{ service.async_client_name }}: # and friendly error handling. rpc = self._client._transport._wrapped_methods[self._client._transport.{{ method.transport_safe_name|snake_case }}] - {% if method.field_headers %} - # Certain fields should be provided within the metadata header; - # add these here. - metadata = tuple(metadata) + ( - gapic_v1.routing_header.to_grpc_metadata(( - {% for field_header in method.field_headers %} - {% if not method.client_streaming %} - ("{{ field_header.raw }}", request.{{ field_header.disambiguated }}), - {% endif %} - {% endfor %} - )), - ) - {% endif %} - +{{ shared_macros.create_metadata(method) }} {{ shared_macros.add_api_version_header_to_metadata(service.version) }} {{ shared_macros.auto_populate_uuid4_fields(api, method) }} diff --git a/gapic/templates/tests/unit/gapic/%name_%version/%sub/test_%service.py.j2 b/gapic/templates/tests/unit/gapic/%name_%version/%sub/test_%service.py.j2 index b159eaa8ad..fa9545d2a1 100644 --- a/gapic/templates/tests/unit/gapic/%name_%version/%sub/test_%service.py.j2 +++ b/gapic/templates/tests/unit/gapic/%name_%version/%sub/test_%service.py.j2 @@ -1055,6 +1055,8 @@ def test_transport_adc(transport_class): {{ test_macros.transport_kind_test(**conf) }} {{ test_macros.empty_call_test(**conf) }} + +{{ test_macros.routing_parameter_test(**conf) }} {% endfor %} {% if 'grpc' in opts.transport %} diff --git a/gapic/templates/tests/unit/gapic/%name_%version/%sub/test_macros.j2 b/gapic/templates/tests/unit/gapic/%name_%version/%sub/test_macros.j2 index ea146e0f42..f3c20ea5db 100644 --- a/gapic/templates/tests/unit/gapic/%name_%version/%sub/test_macros.j2 +++ b/gapic/templates/tests/unit/gapic/%name_%version/%sub/test_macros.j2 @@ -386,43 +386,6 @@ async def test_{{ method_name }}_async_from_dict(): await test_{{ method_name }}_async(request_type=dict) {% endif %}{# full_extended_lro #} -{% if method.explicit_routing %} -def test_{{ method.name|snake_case }}_routing_parameters(): - client = {{ service.client_name }}( - credentials=ga_credentials.AnonymousCredentials(), - ) - - {% for routing_param in method.routing_rule.routing_parameters %} - # Any value that is part of the HTTP/1.1 URI should be sent as - # a field header. Set these to a non-empty value. - request = {{ method.input.ident }}(**{{ routing_param.sample_request }}) - - # Mock the actual call within the gRPC stub, and fake the request. - with mock.patch.object( - type(client.transport.{{ method.transport_safe_name|snake_case }}), - '__call__') as call: - {% if method.void %} - call.return_value = None - {% elif method.lro %} - call.return_value = operations_pb2.Operation(name='operations/op') - {% elif method.server_streaming %} - call.return_value = iter([{{ method.output.ident }}()]) - {% else %} - call.return_value = {{ method.output.ident }}() - {% endif %} - client.{{ method.safe_name|snake_case }}(request) - - # Establish that the underlying gRPC stub method was called. - assert len(call.mock_calls) == 1 - _, args, kw = call.mock_calls[0] - assert args[0] == request - - expected_headers = {{ method.routing_rule.resolve(method.routing_rule, routing_param.sample_request) }} - assert gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw['metadata'] - {% endfor %} -{% endif %} - - {% if method.field_headers and not method.client_streaming and not method.explicit_routing %} def test_{{ method_name }}_field_headers(): client = {{ service.client_name }}( @@ -1797,14 +1760,13 @@ def test_{{ method_name }}_rest_no_http_options(): {% endwith %}{# method_name #} {% endmacro %} - {# This is a generic macro for testing method calls. Ideally this macro can be used to avoid duplication in Jinja templates. If this macro cannot be custimized for a specific method call test, consider creating a new macro with the name `method_call_test_` for the macro which supports a more customized method call. #} -{% macro method_call_test_generic(test_name, method, service, api, transport, request, is_async=False) %} +{% macro method_call_test_generic(test_name, method, service, api, transport, request_dict, is_async=False, routing_param=None) %} {% set transport_name = get_transport_name(transport, is_async) %} {% with method_name = (method.name + ("_unary" if method.operation_service else "")) | snake_case %} {% set async_method_prefix = "async " if is_async else "" %} @@ -1844,7 +1806,7 @@ def test_{{ method_name }}_rest_no_http_options(): {% endfor %} )) {% endif %}{# method.void #} - await client.{{ method_name }}(request={{ request }}) + await client.{{ method_name }}(request={{ request_dict }}) {% else %}{# if not is_async #} {% if method.void %} call.return_value = None @@ -1855,12 +1817,12 @@ def test_{{ method_name }}_rest_no_http_options(): {% else %} call.return_value = {{ method.output.ident }}() {% endif %} - client.{{ method_name }}(request={{ request }}) + client.{{ method_name }}(request={{ request_dict }}) {% endif %}{# is_async #} # Establish that the underlying gRPC stub method was called. call.assert_called() - _, args, _ = call.mock_calls[0] + _, args, {% if routing_param %}kw{% else %}_{% endif %} = call.mock_calls[0] {% with method_settings = api.all_method_settings.get(method.meta.address.proto) %} {% if method_settings is not none %} {% for auto_populated_field in method_settings.auto_populated_fields %} @@ -1871,11 +1833,17 @@ def test_{{ method_name }}_rest_no_http_options(): {% endfor %}{# for auto_populated_field in method_settings.auto_populated_fields #} {% endif %}{# if method_settings is not none #} {% endwith %}{# method_settings #} - {% if request %} - assert args[0] == {{ request }} + {% if request_dict %} + request_msg = {{ method.input.ident }}(**{{ request_dict }}) {% else %} - assert args[0] == {{ method.input.ident }}() - {% endif %}{# request #} + request_msg = {{ method.input.ident }}() + {% endif %}{# request_dict #} + assert args[0] == request_msg + + {% if routing_param %} + expected_headers = {{ method.routing_rule.resolve(method.routing_rule, routing_param.sample_request) }} + assert gapic_v1.routing_header.to_grpc_metadata(expected_headers) in kw['metadata'] + {% endif %} {% endwith %}{# method_name #} {% endmacro %} @@ -1910,7 +1878,7 @@ def test_transport_kind_{{ transport_name }}(): {% if not method.client_streaming %} # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. -{{ method_call_test_generic("empty_call", method, service, api, transport, request=None, is_async=is_async) }} +{{ method_call_test_generic("empty_call", method, service, api, transport, request_dict=None, is_async=is_async) }} {% endif %}{# not method.client_streaming #} {% endfor %}{# method in service.methods.values() #} {% endif %}{# 'rest' not in transport #} @@ -1919,3 +1887,21 @@ def test_transport_kind_{{ transport_name }}(): {% macro get_uuid4_re() -%} [a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12} {%- endmacro %}{# uuid_re #} + +{% macro routing_parameter_test(service, api, transport, is_async) %} +{# TODO(https://github.com/googleapis/gapic-generator-python/issues/2159): + Currently this macro only supports gRPC. It should be updated to support REST + transport as well. +#} +{% if 'rest' not in transport %} +{% for method in service.methods.values() %}{# method #} +{% if method.explicit_routing %} +{# Any value that is part of the HTTP/1.1 URI should be sent as #} +{# a field header. Set these to a non-empty value. #} +{% for routing_param in method.routing_rule.routing_parameters %} +{{ method_call_test_generic("routing_parameters_request_" + loop.index|string, method, service, api, transport, request_dict=routing_param.sample_request, is_async=is_async, routing_param=routing_param) }} +{% endfor %}{# routing_param in method.routing_rule.routing_parameters #} +{% endif %}{# method.explicit_routing #} +{% endfor %}{# method in service.methods.values() #} +{% endif %} +{% endmacro %}{# routing_parameter_test #} diff --git a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py index 54349918c7..64b52c14bb 100755 --- a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py +++ b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py @@ -730,7 +730,7 @@ def sample_export_assets(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.export_assets] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -849,7 +849,7 @@ def sample_list_assets(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.list_assets] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -946,7 +946,7 @@ def sample_batch_get_assets_history(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.batch_get_assets_history] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1067,7 +1067,7 @@ def sample_create_feed(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.create_feed] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1176,7 +1176,7 @@ def sample_get_feed(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.get_feed] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1280,7 +1280,7 @@ def sample_list_feeds(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.list_feeds] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1393,7 +1393,7 @@ def sample_update_feed(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.update_feed] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1487,7 +1487,7 @@ def sample_delete_feed(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.delete_feed] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1702,7 +1702,7 @@ def sample_search_all_resources(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.search_all_resources] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1892,7 +1892,7 @@ def sample_search_all_iam_policies(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.search_all_iam_policies] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1990,7 +1990,7 @@ def sample_analyze_iam_policy(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.analyze_iam_policy] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2097,7 +2097,7 @@ def sample_analyze_iam_policy_longrunning(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.analyze_iam_policy_longrunning] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2195,7 +2195,7 @@ def sample_analyze_move(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.analyze_move] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2291,7 +2291,7 @@ def sample_query_assets(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.query_assets] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2427,7 +2427,7 @@ def sample_create_saved_query(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.create_saved_query] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2532,7 +2532,7 @@ def sample_get_saved_query(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.get_saved_query] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2643,7 +2643,7 @@ def sample_list_saved_queries(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.list_saved_queries] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2770,7 +2770,7 @@ def sample_update_saved_query(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.update_saved_query] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2866,7 +2866,7 @@ def sample_delete_saved_query(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.delete_saved_query] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2947,7 +2947,7 @@ def sample_batch_get_effective_iam_policies(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.batch_get_effective_iam_policies] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -3087,7 +3087,7 @@ def sample_analyze_org_policies(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.analyze_org_policies] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -3238,7 +3238,7 @@ def sample_analyze_org_policy_governed_containers(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.analyze_org_policy_governed_containers] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -3418,7 +3418,7 @@ def sample_analyze_org_policy_governed_assets(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.analyze_org_policy_governed_assets] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( diff --git a/tests/integration/goldens/asset/tests/unit/gapic/asset_v1/test_asset_service.py b/tests/integration/goldens/asset/tests/unit/gapic/asset_v1/test_asset_service.py index 268e14d432..200bcec7e3 100755 --- a/tests/integration/goldens/asset/tests/unit/gapic/asset_v1/test_asset_service.py +++ b/tests/integration/goldens/asset/tests/unit/gapic/asset_v1/test_asset_service.py @@ -953,7 +953,6 @@ async def test_export_assets_async(transport: str = 'grpc_asyncio', request_type async def test_export_assets_async_from_dict(): await test_export_assets_async(request_type=dict) - def test_export_assets_field_headers(): client = AssetServiceClient( credentials=ga_credentials.AnonymousCredentials(), @@ -1183,7 +1182,6 @@ async def test_list_assets_async(transport: str = 'grpc_asyncio', request_type=a async def test_list_assets_async_from_dict(): await test_list_assets_async(request_type=dict) - def test_list_assets_field_headers(): client = AssetServiceClient( credentials=ga_credentials.AnonymousCredentials(), @@ -1685,7 +1683,6 @@ async def test_batch_get_assets_history_async(transport: str = 'grpc_asyncio', r async def test_batch_get_assets_history_async_from_dict(): await test_batch_get_assets_history_async(request_type=dict) - def test_batch_get_assets_history_field_headers(): client = AssetServiceClient( credentials=ga_credentials.AnonymousCredentials(), @@ -1931,7 +1928,6 @@ async def test_create_feed_async(transport: str = 'grpc_asyncio', request_type=a async def test_create_feed_async_from_dict(): await test_create_feed_async(request_type=dict) - def test_create_feed_field_headers(): client = AssetServiceClient( credentials=ga_credentials.AnonymousCredentials(), @@ -2257,7 +2253,6 @@ async def test_get_feed_async(transport: str = 'grpc_asyncio', request_type=asse async def test_get_feed_async_from_dict(): await test_get_feed_async(request_type=dict) - def test_get_feed_field_headers(): client = AssetServiceClient( credentials=ga_credentials.AnonymousCredentials(), @@ -2563,7 +2558,6 @@ async def test_list_feeds_async(transport: str = 'grpc_asyncio', request_type=as async def test_list_feeds_async_from_dict(): await test_list_feeds_async(request_type=dict) - def test_list_feeds_field_headers(): client = AssetServiceClient( credentials=ga_credentials.AnonymousCredentials(), @@ -2887,7 +2881,6 @@ async def test_update_feed_async(transport: str = 'grpc_asyncio', request_type=a async def test_update_feed_async_from_dict(): await test_update_feed_async(request_type=dict) - def test_update_feed_field_headers(): client = AssetServiceClient( credentials=ga_credentials.AnonymousCredentials(), @@ -3191,7 +3184,6 @@ async def test_delete_feed_async(transport: str = 'grpc_asyncio', request_type=a async def test_delete_feed_async_from_dict(): await test_delete_feed_async(request_type=dict) - def test_delete_feed_field_headers(): client = AssetServiceClient( credentials=ga_credentials.AnonymousCredentials(), @@ -3507,7 +3499,6 @@ async def test_search_all_resources_async(transport: str = 'grpc_asyncio', reque async def test_search_all_resources_async_from_dict(): await test_search_all_resources_async(request_type=dict) - def test_search_all_resources_field_headers(): client = AssetServiceClient( credentials=ga_credentials.AnonymousCredentials(), @@ -4039,7 +4030,6 @@ async def test_search_all_iam_policies_async(transport: str = 'grpc_asyncio', re async def test_search_all_iam_policies_async_from_dict(): await test_search_all_iam_policies_async(request_type=dict) - def test_search_all_iam_policies_field_headers(): client = AssetServiceClient( credentials=ga_credentials.AnonymousCredentials(), @@ -4555,7 +4545,6 @@ async def test_analyze_iam_policy_async(transport: str = 'grpc_asyncio', request async def test_analyze_iam_policy_async_from_dict(): await test_analyze_iam_policy_async(request_type=dict) - def test_analyze_iam_policy_field_headers(): client = AssetServiceClient( credentials=ga_credentials.AnonymousCredentials(), @@ -4789,7 +4778,6 @@ async def test_analyze_iam_policy_longrunning_async(transport: str = 'grpc_async async def test_analyze_iam_policy_longrunning_async_from_dict(): await test_analyze_iam_policy_longrunning_async(request_type=dict) - def test_analyze_iam_policy_longrunning_field_headers(): client = AssetServiceClient( credentials=ga_credentials.AnonymousCredentials(), @@ -5015,7 +5003,6 @@ async def test_analyze_move_async(transport: str = 'grpc_asyncio', request_type= async def test_analyze_move_async_from_dict(): await test_analyze_move_async(request_type=dict) - def test_analyze_move_field_headers(): client = AssetServiceClient( credentials=ga_credentials.AnonymousCredentials(), @@ -5253,7 +5240,6 @@ async def test_query_assets_async(transport: str = 'grpc_asyncio', request_type= async def test_query_assets_async_from_dict(): await test_query_assets_async(request_type=dict) - def test_query_assets_field_headers(): client = AssetServiceClient( credentials=ga_credentials.AnonymousCredentials(), @@ -5495,7 +5481,6 @@ async def test_create_saved_query_async(transport: str = 'grpc_asyncio', request async def test_create_saved_query_async_from_dict(): await test_create_saved_query_async(request_type=dict) - def test_create_saved_query_field_headers(): client = AssetServiceClient( credentials=ga_credentials.AnonymousCredentials(), @@ -5837,7 +5822,6 @@ async def test_get_saved_query_async(transport: str = 'grpc_asyncio', request_ty async def test_get_saved_query_async_from_dict(): await test_get_saved_query_async(request_type=dict) - def test_get_saved_query_field_headers(): client = AssetServiceClient( credentials=ga_credentials.AnonymousCredentials(), @@ -6151,7 +6135,6 @@ async def test_list_saved_queries_async(transport: str = 'grpc_asyncio', request async def test_list_saved_queries_async_from_dict(): await test_list_saved_queries_async(request_type=dict) - def test_list_saved_queries_field_headers(): client = AssetServiceClient( credentials=ga_credentials.AnonymousCredentials(), @@ -6667,7 +6650,6 @@ async def test_update_saved_query_async(transport: str = 'grpc_asyncio', request async def test_update_saved_query_async_from_dict(): await test_update_saved_query_async(request_type=dict) - def test_update_saved_query_field_headers(): client = AssetServiceClient( credentials=ga_credentials.AnonymousCredentials(), @@ -6981,7 +6963,6 @@ async def test_delete_saved_query_async(transport: str = 'grpc_asyncio', request async def test_delete_saved_query_async_from_dict(): await test_delete_saved_query_async(request_type=dict) - def test_delete_saved_query_field_headers(): client = AssetServiceClient( credentials=ga_credentials.AnonymousCredentials(), @@ -7287,7 +7268,6 @@ async def test_batch_get_effective_iam_policies_async(transport: str = 'grpc_asy async def test_batch_get_effective_iam_policies_async_from_dict(): await test_batch_get_effective_iam_policies_async(request_type=dict) - def test_batch_get_effective_iam_policies_field_headers(): client = AssetServiceClient( credentials=ga_credentials.AnonymousCredentials(), @@ -7521,7 +7501,6 @@ async def test_analyze_org_policies_async(transport: str = 'grpc_asyncio', reque async def test_analyze_org_policies_async_from_dict(): await test_analyze_org_policies_async(request_type=dict) - def test_analyze_org_policies_field_headers(): client = AssetServiceClient( credentials=ga_credentials.AnonymousCredentials(), @@ -8053,7 +8032,6 @@ async def test_analyze_org_policy_governed_containers_async(transport: str = 'gr async def test_analyze_org_policy_governed_containers_async_from_dict(): await test_analyze_org_policy_governed_containers_async(request_type=dict) - def test_analyze_org_policy_governed_containers_field_headers(): client = AssetServiceClient( credentials=ga_credentials.AnonymousCredentials(), @@ -8585,7 +8563,6 @@ async def test_analyze_org_policy_governed_assets_async(transport: str = 'grpc_a async def test_analyze_org_policy_governed_assets_async_from_dict(): await test_analyze_org_policy_governed_assets_async(request_type=dict) - def test_analyze_org_policy_governed_assets_field_headers(): client = AssetServiceClient( credentials=ga_credentials.AnonymousCredentials(), @@ -15449,7 +15426,10 @@ def test_export_assets_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.ExportAssetsRequest() + request_msg = asset_service.ExportAssetsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15468,7 +15448,10 @@ def test_list_assets_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.ListAssetsRequest() + request_msg = asset_service.ListAssetsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15487,7 +15470,10 @@ def test_batch_get_assets_history_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.BatchGetAssetsHistoryRequest() + request_msg = asset_service.BatchGetAssetsHistoryRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15506,7 +15492,10 @@ def test_create_feed_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.CreateFeedRequest() + request_msg = asset_service.CreateFeedRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15525,7 +15514,10 @@ def test_get_feed_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.GetFeedRequest() + request_msg = asset_service.GetFeedRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15544,7 +15536,10 @@ def test_list_feeds_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.ListFeedsRequest() + request_msg = asset_service.ListFeedsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15563,7 +15558,10 @@ def test_update_feed_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.UpdateFeedRequest() + request_msg = asset_service.UpdateFeedRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15582,7 +15580,10 @@ def test_delete_feed_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.DeleteFeedRequest() + request_msg = asset_service.DeleteFeedRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15601,7 +15602,10 @@ def test_search_all_resources_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.SearchAllResourcesRequest() + request_msg = asset_service.SearchAllResourcesRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15620,7 +15624,10 @@ def test_search_all_iam_policies_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.SearchAllIamPoliciesRequest() + request_msg = asset_service.SearchAllIamPoliciesRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15639,7 +15646,10 @@ def test_analyze_iam_policy_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.AnalyzeIamPolicyRequest() + request_msg = asset_service.AnalyzeIamPolicyRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15658,7 +15668,10 @@ def test_analyze_iam_policy_longrunning_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.AnalyzeIamPolicyLongrunningRequest() + request_msg = asset_service.AnalyzeIamPolicyLongrunningRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15677,7 +15690,10 @@ def test_analyze_move_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.AnalyzeMoveRequest() + request_msg = asset_service.AnalyzeMoveRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15696,7 +15712,10 @@ def test_query_assets_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.QueryAssetsRequest() + request_msg = asset_service.QueryAssetsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15715,7 +15734,10 @@ def test_create_saved_query_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.CreateSavedQueryRequest() + request_msg = asset_service.CreateSavedQueryRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15734,7 +15756,10 @@ def test_get_saved_query_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.GetSavedQueryRequest() + request_msg = asset_service.GetSavedQueryRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15753,7 +15778,10 @@ def test_list_saved_queries_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.ListSavedQueriesRequest() + request_msg = asset_service.ListSavedQueriesRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15772,7 +15800,10 @@ def test_update_saved_query_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.UpdateSavedQueryRequest() + request_msg = asset_service.UpdateSavedQueryRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15791,7 +15822,10 @@ def test_delete_saved_query_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.DeleteSavedQueryRequest() + request_msg = asset_service.DeleteSavedQueryRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15810,7 +15844,10 @@ def test_batch_get_effective_iam_policies_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.BatchGetEffectiveIamPoliciesRequest() + request_msg = asset_service.BatchGetEffectiveIamPoliciesRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15829,7 +15866,10 @@ def test_analyze_org_policies_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.AnalyzeOrgPoliciesRequest() + request_msg = asset_service.AnalyzeOrgPoliciesRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15848,7 +15888,10 @@ def test_analyze_org_policy_governed_containers_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.AnalyzeOrgPolicyGovernedContainersRequest() + request_msg = asset_service.AnalyzeOrgPolicyGovernedContainersRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15867,7 +15910,9 @@ def test_analyze_org_policy_governed_assets_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.AnalyzeOrgPolicyGovernedAssetsRequest() + request_msg = asset_service.AnalyzeOrgPolicyGovernedAssetsRequest() + + assert args[0] == request_msg def test_transport_kind_grpc_asyncio(): @@ -15898,7 +15943,10 @@ async def test_export_assets_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.ExportAssetsRequest() + request_msg = asset_service.ExportAssetsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15921,7 +15969,10 @@ async def test_list_assets_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.ListAssetsRequest() + request_msg = asset_service.ListAssetsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15943,7 +15994,10 @@ async def test_batch_get_assets_history_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.BatchGetAssetsHistoryRequest() + request_msg = asset_service.BatchGetAssetsHistoryRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15970,7 +16024,10 @@ async def test_create_feed_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.CreateFeedRequest() + request_msg = asset_service.CreateFeedRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -15997,7 +16054,10 @@ async def test_get_feed_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.GetFeedRequest() + request_msg = asset_service.GetFeedRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -16019,7 +16079,10 @@ async def test_list_feeds_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.ListFeedsRequest() + request_msg = asset_service.ListFeedsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -16046,7 +16109,10 @@ async def test_update_feed_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.UpdateFeedRequest() + request_msg = asset_service.UpdateFeedRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -16067,7 +16133,10 @@ async def test_delete_feed_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.DeleteFeedRequest() + request_msg = asset_service.DeleteFeedRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -16090,7 +16159,10 @@ async def test_search_all_resources_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.SearchAllResourcesRequest() + request_msg = asset_service.SearchAllResourcesRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -16113,7 +16185,10 @@ async def test_search_all_iam_policies_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.SearchAllIamPoliciesRequest() + request_msg = asset_service.SearchAllIamPoliciesRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -16136,7 +16211,10 @@ async def test_analyze_iam_policy_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.AnalyzeIamPolicyRequest() + request_msg = asset_service.AnalyzeIamPolicyRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -16159,7 +16237,10 @@ async def test_analyze_iam_policy_longrunning_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.AnalyzeIamPolicyLongrunningRequest() + request_msg = asset_service.AnalyzeIamPolicyLongrunningRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -16181,7 +16262,10 @@ async def test_analyze_move_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.AnalyzeMoveRequest() + request_msg = asset_service.AnalyzeMoveRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -16205,7 +16289,10 @@ async def test_query_assets_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.QueryAssetsRequest() + request_msg = asset_service.QueryAssetsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -16231,7 +16318,10 @@ async def test_create_saved_query_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.CreateSavedQueryRequest() + request_msg = asset_service.CreateSavedQueryRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -16257,7 +16347,10 @@ async def test_get_saved_query_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.GetSavedQueryRequest() + request_msg = asset_service.GetSavedQueryRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -16280,7 +16373,10 @@ async def test_list_saved_queries_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.ListSavedQueriesRequest() + request_msg = asset_service.ListSavedQueriesRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -16306,7 +16402,10 @@ async def test_update_saved_query_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.UpdateSavedQueryRequest() + request_msg = asset_service.UpdateSavedQueryRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -16327,7 +16426,10 @@ async def test_delete_saved_query_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.DeleteSavedQueryRequest() + request_msg = asset_service.DeleteSavedQueryRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -16349,7 +16451,10 @@ async def test_batch_get_effective_iam_policies_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.BatchGetEffectiveIamPoliciesRequest() + request_msg = asset_service.BatchGetEffectiveIamPoliciesRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -16372,7 +16477,10 @@ async def test_analyze_org_policies_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.AnalyzeOrgPoliciesRequest() + request_msg = asset_service.AnalyzeOrgPoliciesRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -16395,7 +16503,10 @@ async def test_analyze_org_policy_governed_containers_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.AnalyzeOrgPolicyGovernedContainersRequest() + request_msg = asset_service.AnalyzeOrgPolicyGovernedContainersRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -16418,7 +16529,9 @@ async def test_analyze_org_policy_governed_assets_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == asset_service.AnalyzeOrgPolicyGovernedAssetsRequest() + request_msg = asset_service.AnalyzeOrgPolicyGovernedAssetsRequest() + + assert args[0] == request_msg def test_transport_kind_rest(): diff --git a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py index b38845b359..b9597ea226 100755 --- a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py +++ b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py @@ -714,7 +714,7 @@ def sample_generate_access_token(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.generate_access_token] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -862,7 +862,7 @@ def sample_generate_id_token(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.generate_id_token] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -996,7 +996,7 @@ def sample_sign_blob(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.sign_blob] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1133,7 +1133,7 @@ def sample_sign_jwt(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.sign_jwt] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( diff --git a/tests/integration/goldens/credentials/tests/unit/gapic/credentials_v1/test_iam_credentials.py b/tests/integration/goldens/credentials/tests/unit/gapic/credentials_v1/test_iam_credentials.py index ee56784e86..553259e950 100755 --- a/tests/integration/goldens/credentials/tests/unit/gapic/credentials_v1/test_iam_credentials.py +++ b/tests/integration/goldens/credentials/tests/unit/gapic/credentials_v1/test_iam_credentials.py @@ -937,7 +937,6 @@ async def test_generate_access_token_async(transport: str = 'grpc_asyncio', requ async def test_generate_access_token_async_from_dict(): await test_generate_access_token_async(request_type=dict) - def test_generate_access_token_field_headers(): client = IAMCredentialsClient( credentials=ga_credentials.AnonymousCredentials(), @@ -1275,7 +1274,6 @@ async def test_generate_id_token_async(transport: str = 'grpc_asyncio', request_ async def test_generate_id_token_async_from_dict(): await test_generate_id_token_async(request_type=dict) - def test_generate_id_token_field_headers(): client = IAMCredentialsClient( credentials=ga_credentials.AnonymousCredentials(), @@ -1619,7 +1617,6 @@ async def test_sign_blob_async(transport: str = 'grpc_asyncio', request_type=com async def test_sign_blob_async_from_dict(): await test_sign_blob_async(request_type=dict) - def test_sign_blob_field_headers(): client = IAMCredentialsClient( credentials=ga_credentials.AnonymousCredentials(), @@ -1955,7 +1952,6 @@ async def test_sign_jwt_async(transport: str = 'grpc_asyncio', request_type=comm async def test_sign_jwt_async_from_dict(): await test_sign_jwt_async(request_type=dict) - def test_sign_jwt_field_headers(): client = IAMCredentialsClient( credentials=ga_credentials.AnonymousCredentials(), @@ -3344,7 +3340,10 @@ def test_generate_access_token_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == common.GenerateAccessTokenRequest() + request_msg = common.GenerateAccessTokenRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -3363,7 +3362,10 @@ def test_generate_id_token_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == common.GenerateIdTokenRequest() + request_msg = common.GenerateIdTokenRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -3382,7 +3384,10 @@ def test_sign_blob_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == common.SignBlobRequest() + request_msg = common.SignBlobRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -3401,7 +3406,9 @@ def test_sign_jwt_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == common.SignJwtRequest() + request_msg = common.SignJwtRequest() + + assert args[0] == request_msg def test_transport_kind_grpc_asyncio(): @@ -3432,7 +3439,10 @@ async def test_generate_access_token_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == common.GenerateAccessTokenRequest() + request_msg = common.GenerateAccessTokenRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -3455,7 +3465,10 @@ async def test_generate_id_token_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == common.GenerateIdTokenRequest() + request_msg = common.GenerateIdTokenRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -3479,7 +3492,10 @@ async def test_sign_blob_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == common.SignBlobRequest() + request_msg = common.SignBlobRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -3503,7 +3519,9 @@ async def test_sign_jwt_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == common.SignJwtRequest() + request_msg = common.SignJwtRequest() + + assert args[0] == request_msg def test_transport_kind_rest(): diff --git a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/client.py b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/client.py index ad080aa3ba..53e54c3e04 100755 --- a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/client.py +++ b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/client.py @@ -770,7 +770,7 @@ def sample_get_trigger(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.get_trigger] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -875,7 +875,7 @@ def sample_list_triggers(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.list_triggers] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1024,7 +1024,7 @@ def sample_create_trigger(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.create_trigger] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1162,7 +1162,7 @@ def sample_update_trigger(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.update_trigger] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1291,7 +1291,7 @@ def sample_delete_trigger(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.delete_trigger] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1407,7 +1407,7 @@ def sample_get_channel(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.get_channel] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1512,7 +1512,7 @@ def sample_list_channels(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.list_channels] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1661,7 +1661,7 @@ def sample_create_channel(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.create_channel_] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1791,7 +1791,7 @@ def sample_update_channel(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.update_channel] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1912,7 +1912,7 @@ def sample_delete_channel(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.delete_channel] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2022,7 +2022,7 @@ def sample_get_provider(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.get_provider] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2127,7 +2127,7 @@ def sample_list_providers(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.list_providers] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2245,7 +2245,7 @@ def sample_get_channel_connection(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.get_channel_connection] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2351,7 +2351,7 @@ def sample_list_channel_connections(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.list_channel_connections] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2500,7 +2500,7 @@ def sample_create_channel_connection(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.create_channel_connection] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2619,7 +2619,7 @@ def sample_delete_channel_connection(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.delete_channel_connection] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2735,7 +2735,7 @@ def sample_get_google_channel_config(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.get_google_channel_config] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2856,7 +2856,7 @@ def sample_update_google_channel_config(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.update_google_channel_config] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( diff --git a/tests/integration/goldens/eventarc/tests/unit/gapic/eventarc_v1/test_eventarc.py b/tests/integration/goldens/eventarc/tests/unit/gapic/eventarc_v1/test_eventarc.py index 54f7efa890..3770b34748 100755 --- a/tests/integration/goldens/eventarc/tests/unit/gapic/eventarc_v1/test_eventarc.py +++ b/tests/integration/goldens/eventarc/tests/unit/gapic/eventarc_v1/test_eventarc.py @@ -973,7 +973,6 @@ async def test_get_trigger_async(transport: str = 'grpc_asyncio', request_type=e async def test_get_trigger_async_from_dict(): await test_get_trigger_async(request_type=dict) - def test_get_trigger_field_headers(): client = EventarcClient( credentials=ga_credentials.AnonymousCredentials(), @@ -1293,7 +1292,6 @@ async def test_list_triggers_async(transport: str = 'grpc_asyncio', request_type async def test_list_triggers_async_from_dict(): await test_list_triggers_async(request_type=dict) - def test_list_triggers_field_headers(): client = EventarcClient( credentials=ga_credentials.AnonymousCredentials(), @@ -1807,7 +1805,6 @@ async def test_create_trigger_async(transport: str = 'grpc_asyncio', request_typ async def test_create_trigger_async_from_dict(): await test_create_trigger_async(request_type=dict) - def test_create_trigger_field_headers(): client = EventarcClient( credentials=ga_credentials.AnonymousCredentials(), @@ -2143,7 +2140,6 @@ async def test_update_trigger_async(transport: str = 'grpc_asyncio', request_typ async def test_update_trigger_async_from_dict(): await test_update_trigger_async(request_type=dict) - def test_update_trigger_field_headers(): client = EventarcClient( credentials=ga_credentials.AnonymousCredentials(), @@ -2483,7 +2479,6 @@ async def test_delete_trigger_async(transport: str = 'grpc_asyncio', request_typ async def test_delete_trigger_async_from_dict(): await test_delete_trigger_async(request_type=dict) - def test_delete_trigger_field_headers(): client = EventarcClient( credentials=ga_credentials.AnonymousCredentials(), @@ -2826,7 +2821,6 @@ async def test_get_channel_async(transport: str = 'grpc_asyncio', request_type=e async def test_get_channel_async_from_dict(): await test_get_channel_async(request_type=dict) - def test_get_channel_field_headers(): client = EventarcClient( credentials=ga_credentials.AnonymousCredentials(), @@ -3144,7 +3138,6 @@ async def test_list_channels_async(transport: str = 'grpc_asyncio', request_type async def test_list_channels_async_from_dict(): await test_list_channels_async(request_type=dict) - def test_list_channels_field_headers(): client = EventarcClient( credentials=ga_credentials.AnonymousCredentials(), @@ -3658,7 +3651,6 @@ async def test_create_channel_async(transport: str = 'grpc_asyncio', request_typ async def test_create_channel_async_from_dict(): await test_create_channel_async(request_type=dict) - def test_create_channel_field_headers(): client = EventarcClient( credentials=ga_credentials.AnonymousCredentials(), @@ -3994,7 +3986,6 @@ async def test_update_channel_async(transport: str = 'grpc_asyncio', request_typ async def test_update_channel_async_from_dict(): await test_update_channel_async(request_type=dict) - def test_update_channel_field_headers(): client = EventarcClient( credentials=ga_credentials.AnonymousCredentials(), @@ -4322,7 +4313,6 @@ async def test_delete_channel_async(transport: str = 'grpc_asyncio', request_typ async def test_delete_channel_async_from_dict(): await test_delete_channel_async(request_type=dict) - def test_delete_channel_field_headers(): client = EventarcClient( credentials=ga_credentials.AnonymousCredentials(), @@ -4638,7 +4628,6 @@ async def test_get_provider_async(transport: str = 'grpc_asyncio', request_type= async def test_get_provider_async_from_dict(): await test_get_provider_async(request_type=dict) - def test_get_provider_field_headers(): client = EventarcClient( credentials=ga_credentials.AnonymousCredentials(), @@ -4958,7 +4947,6 @@ async def test_list_providers_async(transport: str = 'grpc_asyncio', request_typ async def test_list_providers_async_from_dict(): await test_list_providers_async(request_type=dict) - def test_list_providers_field_headers(): client = EventarcClient( credentials=ga_credentials.AnonymousCredentials(), @@ -5476,7 +5464,6 @@ async def test_get_channel_connection_async(transport: str = 'grpc_asyncio', req async def test_get_channel_connection_async_from_dict(): await test_get_channel_connection_async(request_type=dict) - def test_get_channel_connection_field_headers(): client = EventarcClient( credentials=ga_credentials.AnonymousCredentials(), @@ -5792,7 +5779,6 @@ async def test_list_channel_connections_async(transport: str = 'grpc_asyncio', r async def test_list_channel_connections_async_from_dict(): await test_list_channel_connections_async(request_type=dict) - def test_list_channel_connections_field_headers(): client = EventarcClient( credentials=ga_credentials.AnonymousCredentials(), @@ -6306,7 +6292,6 @@ async def test_create_channel_connection_async(transport: str = 'grpc_asyncio', async def test_create_channel_connection_async_from_dict(): await test_create_channel_connection_async(request_type=dict) - def test_create_channel_connection_field_headers(): client = EventarcClient( credentials=ga_credentials.AnonymousCredentials(), @@ -6644,7 +6629,6 @@ async def test_delete_channel_connection_async(transport: str = 'grpc_asyncio', async def test_delete_channel_connection_async_from_dict(): await test_delete_channel_connection_async(request_type=dict) - def test_delete_channel_connection_field_headers(): client = EventarcClient( credentials=ga_credentials.AnonymousCredentials(), @@ -6960,7 +6944,6 @@ async def test_get_google_channel_config_async(transport: str = 'grpc_asyncio', async def test_get_google_channel_config_async_from_dict(): await test_get_google_channel_config_async(request_type=dict) - def test_get_google_channel_config_field_headers(): client = EventarcClient( credentials=ga_credentials.AnonymousCredentials(), @@ -7272,7 +7255,6 @@ async def test_update_google_channel_config_async(transport: str = 'grpc_asyncio async def test_update_google_channel_config_async_from_dict(): await test_update_google_channel_config_async(request_type=dict) - def test_update_google_channel_config_field_headers(): client = EventarcClient( credentials=ga_credentials.AnonymousCredentials(), @@ -13086,7 +13068,10 @@ def test_get_trigger_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.GetTriggerRequest() + request_msg = eventarc.GetTriggerRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13105,7 +13090,10 @@ def test_list_triggers_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.ListTriggersRequest() + request_msg = eventarc.ListTriggersRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13124,7 +13112,10 @@ def test_create_trigger_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.CreateTriggerRequest() + request_msg = eventarc.CreateTriggerRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13143,7 +13134,10 @@ def test_update_trigger_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.UpdateTriggerRequest() + request_msg = eventarc.UpdateTriggerRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13162,7 +13156,10 @@ def test_delete_trigger_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.DeleteTriggerRequest() + request_msg = eventarc.DeleteTriggerRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13181,7 +13178,10 @@ def test_get_channel_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.GetChannelRequest() + request_msg = eventarc.GetChannelRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13200,7 +13200,10 @@ def test_list_channels_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.ListChannelsRequest() + request_msg = eventarc.ListChannelsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13219,7 +13222,10 @@ def test_create_channel_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.CreateChannelRequest() + request_msg = eventarc.CreateChannelRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13238,7 +13244,10 @@ def test_update_channel_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.UpdateChannelRequest() + request_msg = eventarc.UpdateChannelRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13257,7 +13266,10 @@ def test_delete_channel_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.DeleteChannelRequest() + request_msg = eventarc.DeleteChannelRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13276,7 +13288,10 @@ def test_get_provider_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.GetProviderRequest() + request_msg = eventarc.GetProviderRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13295,7 +13310,10 @@ def test_list_providers_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.ListProvidersRequest() + request_msg = eventarc.ListProvidersRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13314,7 +13332,10 @@ def test_get_channel_connection_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.GetChannelConnectionRequest() + request_msg = eventarc.GetChannelConnectionRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13333,7 +13354,10 @@ def test_list_channel_connections_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.ListChannelConnectionsRequest() + request_msg = eventarc.ListChannelConnectionsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13352,7 +13376,10 @@ def test_create_channel_connection_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.CreateChannelConnectionRequest() + request_msg = eventarc.CreateChannelConnectionRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13371,7 +13398,10 @@ def test_delete_channel_connection_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.DeleteChannelConnectionRequest() + request_msg = eventarc.DeleteChannelConnectionRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13390,7 +13420,10 @@ def test_get_google_channel_config_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.GetGoogleChannelConfigRequest() + request_msg = eventarc.GetGoogleChannelConfigRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13409,7 +13442,9 @@ def test_update_google_channel_config_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.UpdateGoogleChannelConfigRequest() + request_msg = eventarc.UpdateGoogleChannelConfigRequest() + + assert args[0] == request_msg def test_transport_kind_grpc_asyncio(): @@ -13444,7 +13479,10 @@ async def test_get_trigger_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.GetTriggerRequest() + request_msg = eventarc.GetTriggerRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13468,7 +13506,10 @@ async def test_list_triggers_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.ListTriggersRequest() + request_msg = eventarc.ListTriggersRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13491,7 +13532,10 @@ async def test_create_trigger_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.CreateTriggerRequest() + request_msg = eventarc.CreateTriggerRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13514,7 +13558,10 @@ async def test_update_trigger_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.UpdateTriggerRequest() + request_msg = eventarc.UpdateTriggerRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13537,7 +13584,10 @@ async def test_delete_trigger_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.DeleteTriggerRequest() + request_msg = eventarc.DeleteTriggerRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13565,7 +13615,10 @@ async def test_get_channel_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.GetChannelRequest() + request_msg = eventarc.GetChannelRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13589,7 +13642,10 @@ async def test_list_channels_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.ListChannelsRequest() + request_msg = eventarc.ListChannelsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13612,7 +13668,10 @@ async def test_create_channel_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.CreateChannelRequest() + request_msg = eventarc.CreateChannelRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13635,7 +13694,10 @@ async def test_update_channel_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.UpdateChannelRequest() + request_msg = eventarc.UpdateChannelRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13658,7 +13720,10 @@ async def test_delete_channel_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.DeleteChannelRequest() + request_msg = eventarc.DeleteChannelRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13682,7 +13747,10 @@ async def test_get_provider_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.GetProviderRequest() + request_msg = eventarc.GetProviderRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13706,7 +13774,10 @@ async def test_list_providers_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.ListProvidersRequest() + request_msg = eventarc.ListProvidersRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13732,7 +13803,10 @@ async def test_get_channel_connection_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.GetChannelConnectionRequest() + request_msg = eventarc.GetChannelConnectionRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13756,7 +13830,10 @@ async def test_list_channel_connections_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.ListChannelConnectionsRequest() + request_msg = eventarc.ListChannelConnectionsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13779,7 +13856,10 @@ async def test_create_channel_connection_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.CreateChannelConnectionRequest() + request_msg = eventarc.CreateChannelConnectionRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13802,7 +13882,10 @@ async def test_delete_channel_connection_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.DeleteChannelConnectionRequest() + request_msg = eventarc.DeleteChannelConnectionRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13826,7 +13909,10 @@ async def test_get_google_channel_config_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.GetGoogleChannelConfigRequest() + request_msg = eventarc.GetGoogleChannelConfigRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -13850,7 +13936,9 @@ async def test_update_google_channel_config_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == eventarc.UpdateGoogleChannelConfigRequest() + request_msg = eventarc.UpdateGoogleChannelConfigRequest() + + assert args[0] == request_msg def test_transport_kind_rest(): diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py index 92a2df84cf..9ce55ae44f 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py @@ -732,7 +732,7 @@ def sample_list_buckets(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.list_buckets] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -825,7 +825,7 @@ def sample_get_bucket(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.get_bucket] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -918,7 +918,7 @@ def sample_create_bucket_async(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.create_bucket_async] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1021,7 +1021,7 @@ def sample_update_bucket_async(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.update_bucket_async] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1114,7 +1114,7 @@ def sample_create_bucket(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.create_bucket] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1202,7 +1202,7 @@ def sample_update_bucket(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.update_bucket] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1280,7 +1280,7 @@ def sample_delete_bucket(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.delete_bucket] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1352,7 +1352,7 @@ def sample_undelete_bucket(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.undelete_bucket] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1457,7 +1457,7 @@ def sample_list_views(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.list_views] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1550,7 +1550,7 @@ def sample_get_view(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.get_view] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1634,7 +1634,7 @@ def sample_create_view(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.create_view] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1720,7 +1720,7 @@ def sample_update_view(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.update_view] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1796,7 +1796,7 @@ def sample_delete_view(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.delete_view] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1904,7 +1904,7 @@ def sample_list_sinks(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.list_sinks] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2033,7 +2033,7 @@ def sample_get_sink(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.get_sink] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2170,7 +2170,7 @@ def sample_create_sink(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.create_sink] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2334,7 +2334,7 @@ def sample_update_sink(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.update_sink] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2438,7 +2438,7 @@ def sample_delete_sink(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.delete_sink] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2573,7 +2573,7 @@ def sample_create_link(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.create_link] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2701,7 +2701,7 @@ def sample_delete_link(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.delete_link] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2819,7 +2819,7 @@ def sample_list_links(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.list_links] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2935,7 +2935,7 @@ def sample_get_link(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.get_link] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -3047,7 +3047,7 @@ def sample_list_exclusions(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.list_exclusions] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -3174,7 +3174,7 @@ def sample_get_exclusion(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.get_exclusion] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -3310,7 +3310,7 @@ def sample_create_exclusion(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.create_exclusion] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -3460,7 +3460,7 @@ def sample_update_exclusion(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.update_exclusion] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -3563,7 +3563,7 @@ def sample_delete_exclusion(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.delete_exclusion] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -3666,7 +3666,7 @@ def sample_get_cmek_settings(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.get_cmek_settings] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -3777,7 +3777,7 @@ def sample_update_cmek_settings(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.update_cmek_settings] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -3911,7 +3911,7 @@ def sample_get_settings(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.get_settings] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -4055,7 +4055,7 @@ def sample_update_settings(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.update_settings] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py index 9d085d369e..083eb997b0 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py @@ -654,7 +654,7 @@ def sample_delete_log(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.delete_log] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1196,7 +1196,7 @@ def sample_list_logs(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.list_logs] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py index 1fff39e085..41a2358568 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py @@ -657,7 +657,7 @@ def sample_list_log_metrics(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.list_log_metrics] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -782,7 +782,7 @@ def sample_get_log_metric(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.get_log_metric] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -915,7 +915,7 @@ def sample_create_log_metric(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.create_log_metric] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1047,7 +1047,7 @@ def sample_update_log_metric(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.update_log_metric] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1142,7 +1142,7 @@ def sample_delete_log_metric(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.delete_log_metric] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( diff --git a/tests/integration/goldens/logging/tests/unit/gapic/logging_v2/test_config_service_v2.py b/tests/integration/goldens/logging/tests/unit/gapic/logging_v2/test_config_service_v2.py index e1709e17ed..bb77f848fb 100755 --- a/tests/integration/goldens/logging/tests/unit/gapic/logging_v2/test_config_service_v2.py +++ b/tests/integration/goldens/logging/tests/unit/gapic/logging_v2/test_config_service_v2.py @@ -926,7 +926,6 @@ async def test_list_buckets_async(transport: str = 'grpc_asyncio', request_type= async def test_list_buckets_async_from_dict(): await test_list_buckets_async(request_type=dict) - def test_list_buckets_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -1456,7 +1455,6 @@ async def test_get_bucket_async(transport: str = 'grpc_asyncio', request_type=lo async def test_get_bucket_async_from_dict(): await test_get_bucket_async(request_type=dict) - def test_get_bucket_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -1692,7 +1690,6 @@ async def test_create_bucket_async_async(transport: str = 'grpc_asyncio', reques async def test_create_bucket_async_async_from_dict(): await test_create_bucket_async_async(request_type=dict) - def test_create_bucket_async_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -1926,7 +1923,6 @@ async def test_update_bucket_async_async(transport: str = 'grpc_asyncio', reques async def test_update_bucket_async_async_from_dict(): await test_update_bucket_async_async(request_type=dict) - def test_update_bucket_async_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -2180,7 +2176,6 @@ async def test_create_bucket_async(transport: str = 'grpc_asyncio', request_type async def test_create_bucket_async_from_dict(): await test_create_bucket_async(request_type=dict) - def test_create_bucket_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -2432,7 +2427,6 @@ async def test_update_bucket_async(transport: str = 'grpc_asyncio', request_type async def test_update_bucket_async_from_dict(): await test_update_bucket_async(request_type=dict) - def test_update_bucket_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -2654,7 +2648,6 @@ async def test_delete_bucket_async(transport: str = 'grpc_asyncio', request_type async def test_delete_bucket_async_from_dict(): await test_delete_bucket_async(request_type=dict) - def test_delete_bucket_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -2876,7 +2869,6 @@ async def test_undelete_bucket_async(transport: str = 'grpc_asyncio', request_ty async def test_undelete_bucket_async_from_dict(): await test_undelete_bucket_async(request_type=dict) - def test_undelete_bucket_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -3106,7 +3098,6 @@ async def test_list_views_async(transport: str = 'grpc_asyncio', request_type=lo async def test_list_views_async_from_dict(): await test_list_views_async(request_type=dict) - def test_list_views_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -3620,7 +3611,6 @@ async def test_get_view_async(transport: str = 'grpc_asyncio', request_type=logg async def test_get_view_async_from_dict(): await test_get_view_async(request_type=dict) - def test_get_view_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -3858,7 +3848,6 @@ async def test_create_view_async(transport: str = 'grpc_asyncio', request_type=l async def test_create_view_async_from_dict(): await test_create_view_async(request_type=dict) - def test_create_view_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -4094,7 +4083,6 @@ async def test_update_view_async(transport: str = 'grpc_asyncio', request_type=l async def test_update_view_async_from_dict(): await test_update_view_async(request_type=dict) - def test_update_view_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -4316,7 +4304,6 @@ async def test_delete_view_async(transport: str = 'grpc_asyncio', request_type=l async def test_delete_view_async_from_dict(): await test_delete_view_async(request_type=dict) - def test_delete_view_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -4546,7 +4533,6 @@ async def test_list_sinks_async(transport: str = 'grpc_asyncio', request_type=lo async def test_list_sinks_async_from_dict(): await test_list_sinks_async(request_type=dict) - def test_list_sinks_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -5080,7 +5066,6 @@ async def test_get_sink_async(transport: str = 'grpc_asyncio', request_type=logg async def test_get_sink_async_from_dict(): await test_get_sink_async(request_type=dict) - def test_get_sink_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -5418,7 +5403,6 @@ async def test_create_sink_async(transport: str = 'grpc_asyncio', request_type=l async def test_create_sink_async_from_dict(): await test_create_sink_async(request_type=dict) - def test_create_sink_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -5766,7 +5750,6 @@ async def test_update_sink_async(transport: str = 'grpc_asyncio', request_type=l async def test_update_sink_async_from_dict(): await test_update_sink_async(request_type=dict) - def test_update_sink_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -6090,7 +6073,6 @@ async def test_delete_sink_async(transport: str = 'grpc_asyncio', request_type=l async def test_delete_sink_async_from_dict(): await test_delete_sink_async(request_type=dict) - def test_delete_sink_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -6408,7 +6390,6 @@ async def test_create_link_async(transport: str = 'grpc_asyncio', request_type=l async def test_create_link_async_from_dict(): await test_create_link_async(request_type=dict) - def test_create_link_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -6746,7 +6727,6 @@ async def test_delete_link_async(transport: str = 'grpc_asyncio', request_type=l async def test_delete_link_async_from_dict(): await test_delete_link_async(request_type=dict) - def test_delete_link_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -7060,7 +7040,6 @@ async def test_list_links_async(transport: str = 'grpc_asyncio', request_type=lo async def test_list_links_async_from_dict(): await test_list_links_async(request_type=dict) - def test_list_links_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -7574,7 +7553,6 @@ async def test_get_link_async(transport: str = 'grpc_asyncio', request_type=logg async def test_get_link_async_from_dict(): await test_get_link_async(request_type=dict) - def test_get_link_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -7886,7 +7864,6 @@ async def test_list_exclusions_async(transport: str = 'grpc_asyncio', request_ty async def test_list_exclusions_async_from_dict(): await test_list_exclusions_async(request_type=dict) - def test_list_exclusions_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -8404,7 +8381,6 @@ async def test_get_exclusion_async(transport: str = 'grpc_asyncio', request_type async def test_get_exclusion_async_from_dict(): await test_get_exclusion_async(request_type=dict) - def test_get_exclusion_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -8726,7 +8702,6 @@ async def test_create_exclusion_async(transport: str = 'grpc_asyncio', request_t async def test_create_exclusion_async_from_dict(): await test_create_exclusion_async(request_type=dict) - def test_create_exclusion_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -9058,7 +9033,6 @@ async def test_update_exclusion_async(transport: str = 'grpc_asyncio', request_t async def test_update_exclusion_async_from_dict(): await test_update_exclusion_async(request_type=dict) - def test_update_exclusion_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -9382,7 +9356,6 @@ async def test_delete_exclusion_async(transport: str = 'grpc_asyncio', request_t async def test_delete_exclusion_async_from_dict(): await test_delete_exclusion_async(request_type=dict) - def test_delete_exclusion_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -9704,7 +9677,6 @@ async def test_get_cmek_settings_async(transport: str = 'grpc_asyncio', request_ async def test_get_cmek_settings_async_from_dict(): await test_get_cmek_settings_async(request_type=dict) - def test_get_cmek_settings_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -9944,7 +9916,6 @@ async def test_update_cmek_settings_async(transport: str = 'grpc_asyncio', reque async def test_update_cmek_settings_async_from_dict(): await test_update_cmek_settings_async(request_type=dict) - def test_update_cmek_settings_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -10188,7 +10159,6 @@ async def test_get_settings_async(transport: str = 'grpc_asyncio', request_type= async def test_get_settings_async_from_dict(): await test_get_settings_async(request_type=dict) - def test_get_settings_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -10514,7 +10484,6 @@ async def test_update_settings_async(transport: str = 'grpc_asyncio', request_ty async def test_update_settings_async_from_dict(): await test_update_settings_async(request_type=dict) - def test_update_settings_field_headers(): client = ConfigServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -10955,7 +10924,10 @@ def test_list_buckets_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.ListBucketsRequest() + request_msg = logging_config.ListBucketsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -10974,7 +10946,10 @@ def test_get_bucket_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.GetBucketRequest() + request_msg = logging_config.GetBucketRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -10993,7 +10968,10 @@ def test_create_bucket_async_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.CreateBucketRequest() + request_msg = logging_config.CreateBucketRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11012,7 +10990,10 @@ def test_update_bucket_async_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.UpdateBucketRequest() + request_msg = logging_config.UpdateBucketRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11031,7 +11012,10 @@ def test_create_bucket_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.CreateBucketRequest() + request_msg = logging_config.CreateBucketRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11050,7 +11034,10 @@ def test_update_bucket_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.UpdateBucketRequest() + request_msg = logging_config.UpdateBucketRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11069,7 +11056,10 @@ def test_delete_bucket_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.DeleteBucketRequest() + request_msg = logging_config.DeleteBucketRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11088,7 +11078,10 @@ def test_undelete_bucket_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.UndeleteBucketRequest() + request_msg = logging_config.UndeleteBucketRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11107,7 +11100,10 @@ def test_list_views_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.ListViewsRequest() + request_msg = logging_config.ListViewsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11126,7 +11122,10 @@ def test_get_view_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.GetViewRequest() + request_msg = logging_config.GetViewRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11145,7 +11144,10 @@ def test_create_view_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.CreateViewRequest() + request_msg = logging_config.CreateViewRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11164,7 +11166,10 @@ def test_update_view_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.UpdateViewRequest() + request_msg = logging_config.UpdateViewRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11183,7 +11188,10 @@ def test_delete_view_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.DeleteViewRequest() + request_msg = logging_config.DeleteViewRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11202,7 +11210,10 @@ def test_list_sinks_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.ListSinksRequest() + request_msg = logging_config.ListSinksRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11221,7 +11232,10 @@ def test_get_sink_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.GetSinkRequest() + request_msg = logging_config.GetSinkRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11240,7 +11254,10 @@ def test_create_sink_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.CreateSinkRequest() + request_msg = logging_config.CreateSinkRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11259,7 +11276,10 @@ def test_update_sink_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.UpdateSinkRequest() + request_msg = logging_config.UpdateSinkRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11278,7 +11298,10 @@ def test_delete_sink_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.DeleteSinkRequest() + request_msg = logging_config.DeleteSinkRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11297,7 +11320,10 @@ def test_create_link_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.CreateLinkRequest() + request_msg = logging_config.CreateLinkRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11316,7 +11342,10 @@ def test_delete_link_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.DeleteLinkRequest() + request_msg = logging_config.DeleteLinkRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11335,7 +11364,10 @@ def test_list_links_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.ListLinksRequest() + request_msg = logging_config.ListLinksRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11354,7 +11386,10 @@ def test_get_link_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.GetLinkRequest() + request_msg = logging_config.GetLinkRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11373,7 +11408,10 @@ def test_list_exclusions_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.ListExclusionsRequest() + request_msg = logging_config.ListExclusionsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11392,7 +11430,10 @@ def test_get_exclusion_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.GetExclusionRequest() + request_msg = logging_config.GetExclusionRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11411,7 +11452,10 @@ def test_create_exclusion_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.CreateExclusionRequest() + request_msg = logging_config.CreateExclusionRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11430,7 +11474,10 @@ def test_update_exclusion_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.UpdateExclusionRequest() + request_msg = logging_config.UpdateExclusionRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11449,7 +11496,10 @@ def test_delete_exclusion_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.DeleteExclusionRequest() + request_msg = logging_config.DeleteExclusionRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11468,7 +11518,10 @@ def test_get_cmek_settings_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.GetCmekSettingsRequest() + request_msg = logging_config.GetCmekSettingsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11487,7 +11540,10 @@ def test_update_cmek_settings_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.UpdateCmekSettingsRequest() + request_msg = logging_config.UpdateCmekSettingsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11506,7 +11562,10 @@ def test_get_settings_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.GetSettingsRequest() + request_msg = logging_config.GetSettingsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11525,7 +11584,10 @@ def test_update_settings_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.UpdateSettingsRequest() + request_msg = logging_config.UpdateSettingsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11544,7 +11606,9 @@ def test_copy_log_entries_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.CopyLogEntriesRequest() + request_msg = logging_config.CopyLogEntriesRequest() + + assert args[0] == request_msg def test_transport_kind_grpc_asyncio(): @@ -11575,7 +11639,10 @@ async def test_list_buckets_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.ListBucketsRequest() + request_msg = logging_config.ListBucketsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11604,7 +11671,10 @@ async def test_get_bucket_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.GetBucketRequest() + request_msg = logging_config.GetBucketRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11627,7 +11697,10 @@ async def test_create_bucket_async_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.CreateBucketRequest() + request_msg = logging_config.CreateBucketRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11650,7 +11723,10 @@ async def test_update_bucket_async_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.UpdateBucketRequest() + request_msg = logging_config.UpdateBucketRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11679,7 +11755,10 @@ async def test_create_bucket_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.CreateBucketRequest() + request_msg = logging_config.CreateBucketRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11708,7 +11787,10 @@ async def test_update_bucket_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.UpdateBucketRequest() + request_msg = logging_config.UpdateBucketRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11729,7 +11811,10 @@ async def test_delete_bucket_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.DeleteBucketRequest() + request_msg = logging_config.DeleteBucketRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11750,7 +11835,10 @@ async def test_undelete_bucket_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.UndeleteBucketRequest() + request_msg = logging_config.UndeleteBucketRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11773,7 +11861,10 @@ async def test_list_views_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.ListViewsRequest() + request_msg = logging_config.ListViewsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11798,7 +11889,10 @@ async def test_get_view_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.GetViewRequest() + request_msg = logging_config.GetViewRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11823,7 +11917,10 @@ async def test_create_view_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.CreateViewRequest() + request_msg = logging_config.CreateViewRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11848,7 +11945,10 @@ async def test_update_view_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.UpdateViewRequest() + request_msg = logging_config.UpdateViewRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11869,7 +11969,10 @@ async def test_delete_view_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.DeleteViewRequest() + request_msg = logging_config.DeleteViewRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11892,7 +11995,10 @@ async def test_list_sinks_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.ListSinksRequest() + request_msg = logging_config.ListSinksRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11922,7 +12028,10 @@ async def test_get_sink_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.GetSinkRequest() + request_msg = logging_config.GetSinkRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11952,7 +12061,10 @@ async def test_create_sink_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.CreateSinkRequest() + request_msg = logging_config.CreateSinkRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -11982,7 +12094,10 @@ async def test_update_sink_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.UpdateSinkRequest() + request_msg = logging_config.UpdateSinkRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -12003,7 +12118,10 @@ async def test_delete_sink_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.DeleteSinkRequest() + request_msg = logging_config.DeleteSinkRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -12026,7 +12144,10 @@ async def test_create_link_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.CreateLinkRequest() + request_msg = logging_config.CreateLinkRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -12049,7 +12170,10 @@ async def test_delete_link_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.DeleteLinkRequest() + request_msg = logging_config.DeleteLinkRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -12072,7 +12196,10 @@ async def test_list_links_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.ListLinksRequest() + request_msg = logging_config.ListLinksRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -12097,7 +12224,10 @@ async def test_get_link_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.GetLinkRequest() + request_msg = logging_config.GetLinkRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -12120,7 +12250,10 @@ async def test_list_exclusions_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.ListExclusionsRequest() + request_msg = logging_config.ListExclusionsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -12146,7 +12279,10 @@ async def test_get_exclusion_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.GetExclusionRequest() + request_msg = logging_config.GetExclusionRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -12172,7 +12308,10 @@ async def test_create_exclusion_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.CreateExclusionRequest() + request_msg = logging_config.CreateExclusionRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -12198,7 +12337,10 @@ async def test_update_exclusion_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.UpdateExclusionRequest() + request_msg = logging_config.UpdateExclusionRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -12219,7 +12361,10 @@ async def test_delete_exclusion_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.DeleteExclusionRequest() + request_msg = logging_config.DeleteExclusionRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -12245,7 +12390,10 @@ async def test_get_cmek_settings_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.GetCmekSettingsRequest() + request_msg = logging_config.GetCmekSettingsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -12271,7 +12419,10 @@ async def test_update_cmek_settings_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.UpdateCmekSettingsRequest() + request_msg = logging_config.UpdateCmekSettingsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -12298,7 +12449,10 @@ async def test_get_settings_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.GetSettingsRequest() + request_msg = logging_config.GetSettingsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -12325,7 +12479,10 @@ async def test_update_settings_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.UpdateSettingsRequest() + request_msg = logging_config.UpdateSettingsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -12348,7 +12505,9 @@ async def test_copy_log_entries_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_config.CopyLogEntriesRequest() + request_msg = logging_config.CopyLogEntriesRequest() + + assert args[0] == request_msg def test_transport_grpc_default(): diff --git a/tests/integration/goldens/logging/tests/unit/gapic/logging_v2/test_logging_service_v2.py b/tests/integration/goldens/logging/tests/unit/gapic/logging_v2/test_logging_service_v2.py index 72d12df2f5..dc5a94a1ef 100755 --- a/tests/integration/goldens/logging/tests/unit/gapic/logging_v2/test_logging_service_v2.py +++ b/tests/integration/goldens/logging/tests/unit/gapic/logging_v2/test_logging_service_v2.py @@ -920,7 +920,6 @@ async def test_delete_log_async(transport: str = 'grpc_asyncio', request_type=lo async def test_delete_log_async_from_dict(): await test_delete_log_async(request_type=dict) - def test_delete_log_field_headers(): client = LoggingServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -2327,7 +2326,6 @@ async def test_list_logs_async(transport: str = 'grpc_asyncio', request_type=log async def test_list_logs_async_from_dict(): await test_list_logs_async(request_type=dict) - def test_list_logs_field_headers(): client = LoggingServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -2914,7 +2912,10 @@ def test_delete_log_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging.DeleteLogRequest() + request_msg = logging.DeleteLogRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -2933,7 +2934,10 @@ def test_write_log_entries_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging.WriteLogEntriesRequest() + request_msg = logging.WriteLogEntriesRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -2952,7 +2956,10 @@ def test_list_log_entries_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging.ListLogEntriesRequest() + request_msg = logging.ListLogEntriesRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -2971,7 +2978,10 @@ def test_list_monitored_resource_descriptors_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging.ListMonitoredResourceDescriptorsRequest() + request_msg = logging.ListMonitoredResourceDescriptorsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -2990,7 +3000,9 @@ def test_list_logs_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging.ListLogsRequest() + request_msg = logging.ListLogsRequest() + + assert args[0] == request_msg def test_transport_kind_grpc_asyncio(): @@ -3019,7 +3031,10 @@ async def test_delete_log_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging.DeleteLogRequest() + request_msg = logging.DeleteLogRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -3041,7 +3056,10 @@ async def test_write_log_entries_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging.WriteLogEntriesRequest() + request_msg = logging.WriteLogEntriesRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -3064,7 +3082,10 @@ async def test_list_log_entries_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging.ListLogEntriesRequest() + request_msg = logging.ListLogEntriesRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -3087,7 +3108,10 @@ async def test_list_monitored_resource_descriptors_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging.ListMonitoredResourceDescriptorsRequest() + request_msg = logging.ListMonitoredResourceDescriptorsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -3111,7 +3135,9 @@ async def test_list_logs_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging.ListLogsRequest() + request_msg = logging.ListLogsRequest() + + assert args[0] == request_msg def test_transport_grpc_default(): diff --git a/tests/integration/goldens/logging/tests/unit/gapic/logging_v2/test_metrics_service_v2.py b/tests/integration/goldens/logging/tests/unit/gapic/logging_v2/test_metrics_service_v2.py index 7555ad73a7..64dab1eecb 100755 --- a/tests/integration/goldens/logging/tests/unit/gapic/logging_v2/test_metrics_service_v2.py +++ b/tests/integration/goldens/logging/tests/unit/gapic/logging_v2/test_metrics_service_v2.py @@ -926,7 +926,6 @@ async def test_list_log_metrics_async(transport: str = 'grpc_asyncio', request_t async def test_list_log_metrics_async_from_dict(): await test_list_log_metrics_async(request_type=dict) - def test_list_log_metrics_field_headers(): client = MetricsServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -1456,7 +1455,6 @@ async def test_get_log_metric_async(transport: str = 'grpc_asyncio', request_typ async def test_get_log_metric_async_from_dict(): await test_get_log_metric_async(request_type=dict) - def test_get_log_metric_field_headers(): client = MetricsServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -1790,7 +1788,6 @@ async def test_create_log_metric_async(transport: str = 'grpc_asyncio', request_ async def test_create_log_metric_async_from_dict(): await test_create_log_metric_async(request_type=dict) - def test_create_log_metric_field_headers(): client = MetricsServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -2134,7 +2131,6 @@ async def test_update_log_metric_async(transport: str = 'grpc_asyncio', request_ async def test_update_log_metric_async_from_dict(): await test_update_log_metric_async(request_type=dict) - def test_update_log_metric_field_headers(): client = MetricsServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -2448,7 +2444,6 @@ async def test_delete_log_metric_async(transport: str = 'grpc_asyncio', request_ async def test_delete_log_metric_async_from_dict(): await test_delete_log_metric_async(request_type=dict) - def test_delete_log_metric_field_headers(): client = MetricsServiceV2Client( credentials=ga_credentials.AnonymousCredentials(), @@ -2704,7 +2699,10 @@ def test_list_log_metrics_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_metrics.ListLogMetricsRequest() + request_msg = logging_metrics.ListLogMetricsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -2723,7 +2721,10 @@ def test_get_log_metric_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_metrics.GetLogMetricRequest() + request_msg = logging_metrics.GetLogMetricRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -2742,7 +2743,10 @@ def test_create_log_metric_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_metrics.CreateLogMetricRequest() + request_msg = logging_metrics.CreateLogMetricRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -2761,7 +2765,10 @@ def test_update_log_metric_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_metrics.UpdateLogMetricRequest() + request_msg = logging_metrics.UpdateLogMetricRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -2780,7 +2787,9 @@ def test_delete_log_metric_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_metrics.DeleteLogMetricRequest() + request_msg = logging_metrics.DeleteLogMetricRequest() + + assert args[0] == request_msg def test_transport_kind_grpc_asyncio(): @@ -2811,7 +2820,10 @@ async def test_list_log_metrics_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_metrics.ListLogMetricsRequest() + request_msg = logging_metrics.ListLogMetricsRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -2840,7 +2852,10 @@ async def test_get_log_metric_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_metrics.GetLogMetricRequest() + request_msg = logging_metrics.GetLogMetricRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -2869,7 +2884,10 @@ async def test_create_log_metric_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_metrics.CreateLogMetricRequest() + request_msg = logging_metrics.CreateLogMetricRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -2898,7 +2916,10 @@ async def test_update_log_metric_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_metrics.UpdateLogMetricRequest() + request_msg = logging_metrics.UpdateLogMetricRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -2919,7 +2940,9 @@ async def test_delete_log_metric_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == logging_metrics.DeleteLogMetricRequest() + request_msg = logging_metrics.DeleteLogMetricRequest() + + assert args[0] == request_msg def test_transport_grpc_default(): diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py index 2771c20739..d06e6a56eb 100755 --- a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py +++ b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py @@ -696,7 +696,7 @@ def sample_list_instances(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.list_instances] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -808,7 +808,7 @@ def sample_get_instance(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.get_instance] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -912,7 +912,7 @@ def sample_get_instance_auth_string(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.get_instance_auth_string] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1068,7 +1068,7 @@ def sample_create_instance(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.create_instance] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1213,7 +1213,7 @@ def sample_update_instance(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.update_instance] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1343,7 +1343,7 @@ def sample_upgrade_instance(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.upgrade_instance] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1483,7 +1483,7 @@ def sample_import_instance(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.import_instance] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1620,7 +1620,7 @@ def sample_export_instance(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.export_instance] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1751,7 +1751,7 @@ def sample_failover_instance(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.failover_instance] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -1877,7 +1877,7 @@ def sample_delete_instance(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.delete_instance] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( @@ -2018,7 +2018,7 @@ def sample_reschedule_maintenance(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.reschedule_maintenance] - # Certain fields should be provided within the metadata header; + # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata(( diff --git a/tests/integration/goldens/redis/tests/unit/gapic/redis_v1/test_cloud_redis.py b/tests/integration/goldens/redis/tests/unit/gapic/redis_v1/test_cloud_redis.py index b73b73a738..76a68fb5b3 100755 --- a/tests/integration/goldens/redis/tests/unit/gapic/redis_v1/test_cloud_redis.py +++ b/tests/integration/goldens/redis/tests/unit/gapic/redis_v1/test_cloud_redis.py @@ -954,7 +954,6 @@ async def test_list_instances_async(transport: str = 'grpc_asyncio', request_typ async def test_list_instances_async_from_dict(): await test_list_instances_async(request_type=dict) - def test_list_instances_field_headers(): client = CloudRedisClient( credentials=ga_credentials.AnonymousCredentials(), @@ -1564,7 +1563,6 @@ async def test_get_instance_async(transport: str = 'grpc_asyncio', request_type= async def test_get_instance_async_from_dict(): await test_get_instance_async(request_type=dict) - def test_get_instance_field_headers(): client = CloudRedisClient( credentials=ga_credentials.AnonymousCredentials(), @@ -1874,7 +1872,6 @@ async def test_get_instance_auth_string_async(transport: str = 'grpc_asyncio', r async def test_get_instance_auth_string_async_from_dict(): await test_get_instance_auth_string_async(request_type=dict) - def test_get_instance_auth_string_field_headers(): client = CloudRedisClient( credentials=ga_credentials.AnonymousCredentials(), @@ -2192,7 +2189,6 @@ async def test_create_instance_async(transport: str = 'grpc_asyncio', request_ty async def test_create_instance_async_from_dict(): await test_create_instance_async(request_type=dict) - def test_create_instance_field_headers(): client = CloudRedisClient( credentials=ga_credentials.AnonymousCredentials(), @@ -2528,7 +2524,6 @@ async def test_update_instance_async(transport: str = 'grpc_asyncio', request_ty async def test_update_instance_async_from_dict(): await test_update_instance_async(request_type=dict) - def test_update_instance_field_headers(): client = CloudRedisClient( credentials=ga_credentials.AnonymousCredentials(), @@ -2858,7 +2853,6 @@ async def test_upgrade_instance_async(transport: str = 'grpc_asyncio', request_t async def test_upgrade_instance_async_from_dict(): await test_upgrade_instance_async(request_type=dict) - def test_upgrade_instance_field_headers(): client = CloudRedisClient( credentials=ga_credentials.AnonymousCredentials(), @@ -3186,7 +3180,6 @@ async def test_import_instance_async(transport: str = 'grpc_asyncio', request_ty async def test_import_instance_async_from_dict(): await test_import_instance_async(request_type=dict) - def test_import_instance_field_headers(): client = CloudRedisClient( credentials=ga_credentials.AnonymousCredentials(), @@ -3514,7 +3507,6 @@ async def test_export_instance_async(transport: str = 'grpc_asyncio', request_ty async def test_export_instance_async_from_dict(): await test_export_instance_async(request_type=dict) - def test_export_instance_field_headers(): client = CloudRedisClient( credentials=ga_credentials.AnonymousCredentials(), @@ -3842,7 +3834,6 @@ async def test_failover_instance_async(transport: str = 'grpc_asyncio', request_ async def test_failover_instance_async_from_dict(): await test_failover_instance_async(request_type=dict) - def test_failover_instance_field_headers(): client = CloudRedisClient( credentials=ga_credentials.AnonymousCredentials(), @@ -4170,7 +4161,6 @@ async def test_delete_instance_async(transport: str = 'grpc_asyncio', request_ty async def test_delete_instance_async_from_dict(): await test_delete_instance_async(request_type=dict) - def test_delete_instance_field_headers(): client = CloudRedisClient( credentials=ga_credentials.AnonymousCredentials(), @@ -4488,7 +4478,6 @@ async def test_reschedule_maintenance_async(transport: str = 'grpc_asyncio', req async def test_reschedule_maintenance_async_from_dict(): await test_reschedule_maintenance_async(request_type=dict) - def test_reschedule_maintenance_field_headers(): client = CloudRedisClient( credentials=ga_credentials.AnonymousCredentials(), @@ -7938,7 +7927,10 @@ def test_list_instances_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == cloud_redis.ListInstancesRequest() + request_msg = cloud_redis.ListInstancesRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -7957,7 +7949,10 @@ def test_get_instance_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == cloud_redis.GetInstanceRequest() + request_msg = cloud_redis.GetInstanceRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -7976,7 +7971,10 @@ def test_get_instance_auth_string_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == cloud_redis.GetInstanceAuthStringRequest() + request_msg = cloud_redis.GetInstanceAuthStringRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -7995,7 +7993,10 @@ def test_create_instance_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == cloud_redis.CreateInstanceRequest() + request_msg = cloud_redis.CreateInstanceRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -8014,7 +8015,10 @@ def test_update_instance_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == cloud_redis.UpdateInstanceRequest() + request_msg = cloud_redis.UpdateInstanceRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -8033,7 +8037,10 @@ def test_upgrade_instance_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == cloud_redis.UpgradeInstanceRequest() + request_msg = cloud_redis.UpgradeInstanceRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -8052,7 +8059,10 @@ def test_import_instance_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == cloud_redis.ImportInstanceRequest() + request_msg = cloud_redis.ImportInstanceRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -8071,7 +8081,10 @@ def test_export_instance_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == cloud_redis.ExportInstanceRequest() + request_msg = cloud_redis.ExportInstanceRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -8090,7 +8103,10 @@ def test_failover_instance_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == cloud_redis.FailoverInstanceRequest() + request_msg = cloud_redis.FailoverInstanceRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -8109,7 +8125,10 @@ def test_delete_instance_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == cloud_redis.DeleteInstanceRequest() + request_msg = cloud_redis.DeleteInstanceRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -8128,7 +8147,9 @@ def test_reschedule_maintenance_empty_call_grpc(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == cloud_redis.RescheduleMaintenanceRequest() + request_msg = cloud_redis.RescheduleMaintenanceRequest() + + assert args[0] == request_msg def test_transport_kind_grpc_asyncio(): @@ -8160,7 +8181,10 @@ async def test_list_instances_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == cloud_redis.ListInstancesRequest() + request_msg = cloud_redis.ListInstancesRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -8209,7 +8233,10 @@ async def test_get_instance_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == cloud_redis.GetInstanceRequest() + request_msg = cloud_redis.GetInstanceRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -8232,7 +8259,10 @@ async def test_get_instance_auth_string_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == cloud_redis.GetInstanceAuthStringRequest() + request_msg = cloud_redis.GetInstanceAuthStringRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -8255,7 +8285,10 @@ async def test_create_instance_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == cloud_redis.CreateInstanceRequest() + request_msg = cloud_redis.CreateInstanceRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -8278,7 +8311,10 @@ async def test_update_instance_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == cloud_redis.UpdateInstanceRequest() + request_msg = cloud_redis.UpdateInstanceRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -8301,7 +8337,10 @@ async def test_upgrade_instance_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == cloud_redis.UpgradeInstanceRequest() + request_msg = cloud_redis.UpgradeInstanceRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -8324,7 +8363,10 @@ async def test_import_instance_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == cloud_redis.ImportInstanceRequest() + request_msg = cloud_redis.ImportInstanceRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -8347,7 +8389,10 @@ async def test_export_instance_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == cloud_redis.ExportInstanceRequest() + request_msg = cloud_redis.ExportInstanceRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -8370,7 +8415,10 @@ async def test_failover_instance_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == cloud_redis.FailoverInstanceRequest() + request_msg = cloud_redis.FailoverInstanceRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -8393,7 +8441,10 @@ async def test_delete_instance_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == cloud_redis.DeleteInstanceRequest() + request_msg = cloud_redis.DeleteInstanceRequest() + + assert args[0] == request_msg + # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -8416,7 +8467,9 @@ async def test_reschedule_maintenance_empty_call_grpc_asyncio(): # Establish that the underlying gRPC stub method was called. call.assert_called() _, args, _ = call.mock_calls[0] - assert args[0] == cloud_redis.RescheduleMaintenanceRequest() + request_msg = cloud_redis.RescheduleMaintenanceRequest() + + assert args[0] == request_msg def test_transport_kind_rest():