From 6671d87cef56ee5861fed22a58b25834c0f28b7e Mon Sep 17 00:00:00 2001 From: Michael Sayapin Date: Wed, 17 Jun 2020 11:37:36 +0800 Subject: [PATCH] Conformance formatting --- .../test_to_dict_with_missing_enum.py | 17 +++++++++++++---- .../to_dict_with_missing_enum.proto | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/betterproto/tests/inputs/to_dict_with_missing_enum/test_to_dict_with_missing_enum.py b/betterproto/tests/inputs/to_dict_with_missing_enum/test_to_dict_with_missing_enum.py index bf5f5fa..57bf810 100644 --- a/betterproto/tests/inputs/to_dict_with_missing_enum/test_to_dict_with_missing_enum.py +++ b/betterproto/tests/inputs/to_dict_with_missing_enum/test_to_dict_with_missing_enum.py @@ -1,7 +1,16 @@ -from betterproto.tests.output_betterproto.to_dict_with_missing_enum.to_dict_with_missing_enum import TestMessage, TestMessageMyEnum +from betterproto.tests.output_betterproto.to_dict_with_missing_enum.to_dict_with_missing_enum import ( + Test, + TestMyEnum, +) def test_message_attributes(): - assert TestMessage(x=TestMessageMyEnum.ONE).to_dict()['x'] == "ONE", "MyEnum.ONE is not serialized to 'ONE'" - assert TestMessage(x=TestMessageMyEnum.THREE).to_dict()['x'] == "THREE", "MyEnum.THREE is not serialized to 'THREE'" - assert TestMessage(x=TestMessageMyEnum.FOUR).to_dict()['x'] == "FOUR", "MyEnum.FOUR is not serialized to 'FOUR'" + assert ( + Test(x=TestMyEnum.ONE).to_dict()['x'] == "ONE" + ), "MyEnum.ONE is not serialized to 'ONE'" + assert ( + Test(x=TestMyEnum.THREE).to_dict()['x'] == "THREE" + ), "MyEnum.THREE is not serialized to 'THREE'" + assert ( + Test(x=TestMyEnum.FOUR).to_dict()['x'] == "FOUR" + ), "MyEnum.FOUR is not serialized to 'FOUR'" diff --git a/betterproto/tests/inputs/to_dict_with_missing_enum/to_dict_with_missing_enum.proto b/betterproto/tests/inputs/to_dict_with_missing_enum/to_dict_with_missing_enum.proto index 56d2cf9..c785f01 100644 --- a/betterproto/tests/inputs/to_dict_with_missing_enum/to_dict_with_missing_enum.proto +++ b/betterproto/tests/inputs/to_dict_with_missing_enum/to_dict_with_missing_enum.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -message TestMessage { +message Test { enum MyEnum { ZERO = 0; ONE = 1;