Delete temporary file after media ejection
Story: 2008742 Task: 42096 Change-Id: If1a4fe6b08a3845aa2217e22d773855656087989
This commit is contained in:
parent
cee6785048
commit
83fa744fbb
|
@ -188,7 +188,7 @@ class StaticDriver(base.DriverBase):
|
|||
device_info['Image'] = local_file
|
||||
device_info['Inserted'] = inserted
|
||||
device_info['WriteProtected'] = write_protected
|
||||
device_info['_local_file_path'] = local_file_path
|
||||
device_info['_local_file'] = local_file_path
|
||||
|
||||
self._devices.update({(identity, device): device_info})
|
||||
|
||||
|
|
|
@ -105,6 +105,7 @@ class StaticDriverTestCase(base.BaseTestCase):
|
|||
self.assertEqual('fish.iso', device_info['Image'])
|
||||
self.assertTrue(device_info['Inserted'])
|
||||
self.assertFalse(device_info['WriteProtected'])
|
||||
self.assertEqual(local_file, device_info['_local_file'])
|
||||
|
||||
@mock.patch.object(vmedia.StaticDriver, '_get_device', autospec=True)
|
||||
@mock.patch.object(builtins, 'open', autospec=True)
|
||||
|
|
Loading…
Reference in New Issue