Add extra related test cases for #11
This commit is contained in:
parent
382fabb96c
commit
142e976c40
@ -1,3 +1,5 @@
|
|||||||
{
|
{
|
||||||
"UPPERCASE": 10
|
"UPPERCASE": 10,
|
||||||
|
"UPPERCASE_V2": 10,
|
||||||
|
"UPPER_CAMEL_CASE": 10
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
message Test {
|
message Test {
|
||||||
int32 UPPER_CAMEL_CASE = 1;
|
int32 UPPERCASE = 1;
|
||||||
|
int32 UPPERCASE_V2 = 2;
|
||||||
|
int32 UPPER_CAMEL_CASE = 3;
|
||||||
}
|
}
|
@ -5,6 +5,12 @@ from betterproto.tests.output_betterproto.casing_message_field_uppercase.casing_
|
|||||||
|
|
||||||
def test_message_casing():
|
def test_message_casing():
|
||||||
message = Test()
|
message = Test()
|
||||||
|
assert hasattr(
|
||||||
|
message, "uppercase"
|
||||||
|
), "UPPERCASE attribute is converted to 'uppercase' in python"
|
||||||
|
assert hasattr(
|
||||||
|
message, "uppercase_v2"
|
||||||
|
), "UPPERCASE_V2 attribute is converted to 'uppercase_v2' in python"
|
||||||
assert hasattr(
|
assert hasattr(
|
||||||
message, "upper_camel_case"
|
message, "upper_camel_case"
|
||||||
), "UPPER_CAMEL_CASE attribute is converted to upper_camel_case in python"
|
), "UPPER_CAMEL_CASE attribute is converted to upper_camel_case in python"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user