Conformance formatting
This commit is contained in:
parent
cd66b0511a
commit
6671d87cef
@ -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'"
|
||||
|
@ -1,6 +1,6 @@
|
||||
syntax = "proto3";
|
||||
|
||||
message TestMessage {
|
||||
message Test {
|
||||
enum MyEnum {
|
||||
ZERO = 0;
|
||||
ONE = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user