Skip to content

Commit 142e976

Browse files
Add extra related test cases for #11
1 parent 382fabb commit 142e976

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
{
2-
"UPPERCASE": 10
2+
"UPPERCASE": 10,
3+
"UPPERCASE_V2": 10,
4+
"UPPER_CAMEL_CASE": 10
35
}
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
syntax = "proto3";
22

33
message Test {
4-
int32 UPPER_CAMEL_CASE = 1;
4+
int32 UPPERCASE = 1;
5+
int32 UPPERCASE_V2 = 2;
6+
int32 UPPER_CAMEL_CASE = 3;
57
}

betterproto/tests/inputs/casing_message_field_uppercase/casing_message_field_uppercase.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55

66
def test_message_casing():
77
message = Test()
8+
assert hasattr(
9+
message, "uppercase"
10+
), "UPPERCASE attribute is converted to 'uppercase' in python"
11+
assert hasattr(
12+
message, "uppercase_v2"
13+
), "UPPERCASE_V2 attribute is converted to 'uppercase_v2' in python"
814
assert hasattr(
915
message, "upper_camel_case"
1016
), "UPPER_CAMEL_CASE attribute is converted to upper_camel_case in python"

0 commit comments

Comments
 (0)