-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
38 lines (36 loc) · 1.54 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from ShitMountainGenerator.shitter import Shitter
if __name__ == '__main__':
shitter = Shitter.from_template("test_case.tmpl")
r = shitter.shit({
"fields" : [
{
"py_name" : "py_name1",
"py_type" : "py_type1",
"py_class_name": "PyClassName1",
"json_name" : "json_name_1",
"is_struct" : True,
"is_list" : False,
"name" : "name1"
},
{
"py_name" : "py_name2",
"py_type" : "py_type2",
"py_class_name": "PyClassName2",
"json_name" : "json_name_2",
"is_struct" : False,
"is_list" : False,
"name" : "name2"
},
{
"py_name" : "py_name3",
"py_type" : "py_type3",
"py_class_name": "PyClassName3",
"json_name" : "json_name_3",
"is_list" : True,
"is_struct" : True,
"name" : "name3"
}
],
"py_class_name": "PY_CLASS_NAME"
})
print(r)