summaryrefslogtreecommitdiffstats
path: root/tests/inputs/casing_message_field_uppercase
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-29 09:40:12 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-29 09:40:12 +0000
commit14b40ec77a4bf8605789cc3aff0eb87625510a41 (patch)
tree4064d27144d6deaabfcd96df01bd996baa8b51a0 /tests/inputs/casing_message_field_uppercase
parentInitial commit. (diff)
downloadpython-aristaproto-14b40ec77a4bf8605789cc3aff0eb87625510a41.tar.xz
python-aristaproto-14b40ec77a4bf8605789cc3aff0eb87625510a41.zip
Adding upstream version 1.2+20240521.upstream/1.2+20240521upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/inputs/casing_message_field_uppercase')
-rw-r--r--tests/inputs/casing_message_field_uppercase/casing_message_field_uppercase.proto9
-rw-r--r--tests/inputs/casing_message_field_uppercase/casing_message_field_uppercase.py14
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/inputs/casing_message_field_uppercase/casing_message_field_uppercase.proto b/tests/inputs/casing_message_field_uppercase/casing_message_field_uppercase.proto
new file mode 100644
index 0000000..c6d42c3
--- /dev/null
+++ b/tests/inputs/casing_message_field_uppercase/casing_message_field_uppercase.proto
@@ -0,0 +1,9 @@
+syntax = "proto3";
+
+package casing_message_field_uppercase;
+
+message Test {
+ int32 UPPERCASE = 1;
+ int32 UPPERCASE_V2 = 2;
+ int32 UPPER_CAMEL_CASE = 3;
+} \ No newline at end of file
diff --git a/tests/inputs/casing_message_field_uppercase/casing_message_field_uppercase.py b/tests/inputs/casing_message_field_uppercase/casing_message_field_uppercase.py
new file mode 100644
index 0000000..01a5234
--- /dev/null
+++ b/tests/inputs/casing_message_field_uppercase/casing_message_field_uppercase.py
@@ -0,0 +1,14 @@
+from tests.output_aristaproto.casing_message_field_uppercase import Test
+
+
+def test_message_casing():
+ 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(
+ message, "upper_camel_case"
+ ), "UPPER_CAMEL_CASE attribute is converted to upper_camel_case in python"