@@ -132,7 +132,7 @@ def test_reboot(self):
132
132
133
133
volume = VOLUME
134
134
# skip the wait_for_device_reboot
135
- with ( mock .patch .object (self .device , "_wait_for_device_reboot" , return_value = True ) ):
135
+ with mock .patch .object (self .device , "_wait_for_device_reboot" , return_value = True ):
136
136
self .device .reboot (volume = volume )
137
137
138
138
# # Check if _get_active_volume worked
@@ -146,7 +146,7 @@ def test_reboot_with_timer(self):
146
146
api .tm .sys .software .volumes .volume .load .return_value .active = True
147
147
148
148
# skipping timeout! It's too long!!
149
- with ( mock .patch .object (self .device , "_wait_for_device_reboot" , timeout = 0 ) ):
149
+ with mock .patch .object (self .device , "_wait_for_device_reboot" , timeout = 0 ):
150
150
self .device .reboot (volume = volume )
151
151
152
152
# # Check if _get_active_volume worked
@@ -157,7 +157,7 @@ def test_reboot_with_timer(self):
157
157
def test_reboot_no_volume (self ):
158
158
api = self .device .api_handler
159
159
160
- with ( mock .patch .object (self .device , "_wait_for_device_reboot" , return_value = True ) ):
160
+ with mock .patch .object (self .device , "_wait_for_device_reboot" , return_value = True ):
161
161
self .device .reboot ()
162
162
163
163
# Check if _reboot_to_volume worked
@@ -175,7 +175,7 @@ def test_set_boot_options(self):
175
175
# Patching out _volume_exists for _image_install
176
176
api .tm .sys .software .volumes .volume .exists .return_value = True
177
177
178
- with ( mock .patch .object (self .device , "_wait_for_image_installed" , timeout = 0 , return_value = None ) ):
178
+ with mock .patch .object (self .device , "_wait_for_image_installed" , timeout = 0 , return_value = None ):
179
179
self .device .set_boot_options (image_name = image_name , volume = volume )
180
180
181
181
api .tm .util .bash .exec_cmd .assert_called ()
@@ -194,7 +194,7 @@ def test_set_boot_options_no_image(self):
194
194
# Patching out _volume_exists for _image_install
195
195
api .tm .sys .software .volumes .volume .exists .return_value = False
196
196
197
- with ( mock .patch .object (self .device , "_wait_for_image_installed" , timeout = 0 , return_value = None ) ):
197
+ with mock .patch .object (self .device , "_wait_for_image_installed" , timeout = 0 , return_value = None ):
198
198
self .device .set_boot_options (image_name = image_name , volume = volume )
199
199
200
200
api .tm .util .bash .exec_cmd .assert_called ()
@@ -215,7 +215,7 @@ def test_set_boot_options_bad_boot(self):
215
215
# Patching out _volume_exists for _image_install
216
216
api .tm .sys .software .volumes .volume .exists .return_value = False
217
217
218
- with ( mock .patch .object (self .device , "_wait_for_image_installed" , timeout = 0 , return_value = None ) ):
218
+ with mock .patch .object (self .device , "_wait_for_image_installed" , timeout = 0 , return_value = None ):
219
219
with pytest .raises (NTCFileNotFoundError ):
220
220
self .device .set_boot_options (image_name = "bad_image" , volume = volume )
221
221
@@ -248,7 +248,7 @@ def test_install_os(self):
248
248
# Patching out _image_install
249
249
api .tm .sys .software .volumes .volume .exists .return_value = True
250
250
251
- with ( mock .patch .object (self .device , "_wait_for_image_installed" , timeout = 0 , return_value = None ) ):
251
+ with mock .patch .object (self .device , "_wait_for_image_installed" , timeout = 0 , return_value = None ):
252
252
self .device .install_os (image_name = image_name , volume = volume )
253
253
254
254
api .tm .util .bash .exec_cmd .assert_called ()
0 commit comments