@@ -760,9 +760,9 @@ def test_{{ method.name|snake_case }}_flattened():
760760 assert len(call.mock_calls) == 1
761761 _, args, _ = call.mock_calls[0]
762762 {% for key , field in method .flattened_fields .items () %}{% if not field .oneof or field .proto 3_optional %}
763- {% if field .ident |string () == 'timestamp .Timestamp' %}
763+ {% if field .ident |string () == 'timestamp_pb2 .Timestamp' %}
764764 assert TimestampRule().to_proto(args[0].{{ key }}) == {{ field.mock_value }}
765- {% elif field .ident |string () == 'duration .Duration' %}
765+ {% elif field .ident |string () == 'duration_pb2 .Duration' %}
766766 assert DurationRule().to_proto(args[0].{{ key }}) == {{ field.mock_value }}
767767 {% else %}
768768 assert args[0].{{ key }} == {{ field.mock_value }}
@@ -845,9 +845,9 @@ async def test_{{ method.name|snake_case }}_flattened_async():
845845 assert len(call.mock_calls)
846846 _, args, _ = call.mock_calls[0]
847847 {% for key , field in method .flattened_fields .items () %}{% if not field .oneof or field .proto 3_optional %}
848- {% if field .ident |string () == 'timestamp .Timestamp' %}
848+ {% if field .ident |string () == 'timestamp_pb2 .Timestamp' %}
849849 assert TimestampRule().to_proto(args[0].{{ key }}) == {{ field.mock_value }}
850- {% elif field .ident |string () == 'duration .Duration' %}
850+ {% elif field .ident |string () == 'duration_pb2 .Duration' %}
851851 assert DurationRule().to_proto(args[0].{{ key }}) == {{ field.mock_value }}
852852 {% else %}
853853 assert args[0].{{ key }} == {{ field.mock_value }}
@@ -1194,9 +1194,9 @@ def test_{{ method.name|snake_case }}_rest_flattened():
11941194 body = http_params.get('data')
11951195 {% for key , field in method .flattened_fields .items () %}
11961196 {% if not field .oneof or field .proto 3_optional %}
1197- {% if field .ident |string () == 'timestamp .Timestamp' %}
1197+ {% if field .ident |string () == 'timestamp_pb2 .Timestamp' %}
11981198 assert TimestampRule().to_proto(http_call[0].{{ key }}) == {{ field.mock_value }}
1199- {% elif field .ident |string () == 'duration .Duration' %}
1199+ {% elif field .ident |string () == 'duration_pb2 .Duration' %}
12001200 assert DurationRule().to_proto(http_call[0].{{ key }}) == {{ field.mock_value }}
12011201 {% else %}
12021202 assert {% if field .field_pb is msg_field_pb %} {{ field.ident }}.to_json({{ field.name }}, including_default_value_fields=False, use_integers_for_enums=False)
0 commit comments