diff --git a/tests/test_marshal_types_struct.py b/tests/test_marshal_types_struct.py index 6ae6573..8ca2cde 100644 --- a/tests/test_marshal_types_struct.py +++ b/tests/test_marshal_types_struct.py @@ -248,21 +248,21 @@ class Foo(proto.Message): def test_struct_nested(): class Foo(proto.Message): struct_field: struct_pb2.Struct = proto.Field( - proto.MESSAGE, - number=1, - message=struct_pb2.Struct, - ) + proto.MESSAGE, + number=1, + message=struct_pb2.Struct, + ) class Bar(proto.Message): foo_field: Foo = proto.Field( - proto.MESSAGE, - number=1, - message=Foo, - ) - + proto.MESSAGE, + number=1, + message=Foo, + ) + foo = Foo({"struct_field": {"foo": "bagel"}}) assert foo.struct_field == {"foo": "bagel"} - + bar = Bar({"foo_field": {"struct_field": {"foo": "cheese"}}}) assert bar.foo_field == Foo({"struct_field": {"foo": "cheese"}}) assert bar.foo_field.struct_field == {"foo": "cheese"}