-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_device.py
131 lines (118 loc) · 4.45 KB
/
test_device.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
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# coding: utf-8
"""
Notehub API
The OpenAPI definition for the Notehub.io API.
The version of the OpenAPI document: 1.2.0
Contact: [email protected]
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import unittest
from notehub_py.models.device import Device
class TestDevice(unittest.TestCase):
"""Device unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def make_instance(self, include_optional) -> Device:
"""Test Device
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 `Device`
"""
model = Device()
if include_optional:
return Device(
uid = '',
serial_number = '',
provisioned = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
last_activity = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
contact = notehub_py.models.contact.Contact(
name = '',
email = '',
role = '',
organization = '', ),
product_uid = '',
fleet_uids = [
''
],
tower_info = notehub_py.models.device_tower_info.Device_tower_info(
mcc = 56,
mnc = 56,
lac = 56,
cell_id = 56, ),
tower_location = notehub_py.models.location.Location(
when = '',
name = '',
country = '',
timezone = '',
latitude = 1.337,
longitude = 1.337, ),
gps_location = notehub_py.models.location.Location(
when = '',
name = '',
country = '',
timezone = '',
latitude = 1.337,
longitude = 1.337, ),
triangulated_location = notehub_py.models.location.Location(
when = '',
name = '',
country = '',
timezone = '',
latitude = 1.337,
longitude = 1.337, ),
voltage = 1.337,
temperature = 1.337,
dfu = notehub_py.models.dfu_env.DFUEnv(
card = notehub_py.models.dfu_state.DFUState(
type = 'card',
file = '',
length = 1.337,
crc32 = 1.337,
md5 = '',
mode = 'idle',
status = '',
began = 1.337,
retry = 1.337,
errors = 1.337,
read = 1.337,
updated = 1.337,
version = '', ),
user = notehub_py.models.dfu_state.DFUState(
type = 'card',
file = '',
length = 1.337,
crc32 = 1.337,
md5 = '',
mode = 'idle',
status = '',
began = 1.337,
retry = 1.337,
errors = 1.337,
read = 1.337,
updated = 1.337,
version = '', ), ),
sku = '',
disabled = True
)
else:
return Device(
uid = '',
provisioned = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
product_uid = '',
fleet_uids = [
''
],
voltage = 1.337,
temperature = 1.337,
)
"""
def testDevice(self):
"""Test Device"""
# inst_req_only = self.make_instance(include_optional=False)
# inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()