-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest_create_struct.py
More file actions
112 lines (97 loc) · 4.71 KB
/
Copy pathtest_create_struct.py
File metadata and controls
112 lines (97 loc) · 4.71 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# coding: utf-8
"""
Permify API
Permify is an open source authorization service for creating fine-grained and scalable authorization systems.
The version of the OpenAPI document: v1.7.2
Contact: hello@permify.co
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import unittest
import datetime
from permify.models.create_struct import CreateStruct
class TestCreateStruct(unittest.TestCase):
"""CreateStruct unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def make_instance(self, include_optional) -> CreateStruct:
"""Test CreateStruct
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included """
# uncomment below to create an instance of `CreateStruct`
"""
model = CreateStruct()
if include_optional:
return CreateStruct(
message_name = '',
entries = [
permify.models.entry.Entry(
id = '',
field_key = '',
map_key = permify.models.expr.Expr(
id = '',
const_expr = permify.models.constant.Constant(
null_value = '',
bool_value = True,
int64_value = '',
uint64_value = '',
double_value = 1.337,
string_value = '',
bytes_value = 'YQ==',
duration_value = '',
timestamp_value = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ),
ident_expr = permify.models.ident.Ident(
name = '', ),
select_expr = permify.models.select.Select(
operand = permify.models.expr.Expr(
id = '',
call_expr = permify.models.expr/call.Expr.Call(
target = ,
function = '',
args = [
], ),
list_expr = permify.models.create_list.CreateList(
elements = [
],
optional_indices = [
56
], ),
struct_expr = permify.models.create_struct.CreateStruct(
message_name = '', ),
comprehension_expr = permify.models.comprehension.Comprehension(
iter_var = '',
iter_var2 = '',
iter_range = ,
accu_var = '',
accu_init = ,
loop_condition = ,
loop_step = ,
result = , ), ),
field = '',
test_only = True, ),
call_expr = permify.models.expr/call.Expr.Call(
function = '', ),
list_expr = permify.models.create_list.CreateList(),
struct_expr = permify.models.create_struct.CreateStruct(
message_name = '', ),
comprehension_expr = permify.models.comprehension.Comprehension(
iter_var = '',
iter_var2 = '',
accu_var = '', ), ),
value = ,
optional_entry = True, )
]
)
else:
return CreateStruct(
)
"""
def testCreateStruct(self):
"""Test CreateStruct"""
# inst_req_only = self.make_instance(include_optional=False)
# inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()