Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions glazier/lib/actions/drivers_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

class DriversTest(test_utils.GlazierTestCase):

@mock.patch.object(drivers.winpe, 'check_winpe', autospec=True)
@mock.patch.object(BuildInfo, 'ReleasePath')
@mock.patch.object(BuildInfo, 'Branch')
@mock.patch('glazier.lib.download.Download.VerifyShaHash', autospec=True)
Expand All @@ -32,7 +33,7 @@ class DriversTest(test_utils.GlazierTestCase):
@mock.patch.object(drivers.file_util, 'CreateDirectories', autospec=True)
def test_driver_wim(self, mock_createdirectories, mock_execute_binary,
mock_downloadfile, mock_verifyshahash, mock_branch,
mock_releasepath):
mock_releasepath, mock_check_winpe):

bi = BuildInfo()

Expand All @@ -49,6 +50,7 @@ def test_driver_wim(self, mock_createdirectories, mock_execute_binary,
}
mock_branch.return_value = 'stable'
mock_releasepath.return_value = '/'
mock_check_winpe.return_value = False

# Success
dw = drivers.DriverWIM(conf['data']['driver'], bi)
Expand All @@ -62,7 +64,7 @@ def test_driver_wim(self, mock_createdirectories, mock_execute_binary,
cache = drivers.constants.SYS_CACHE
mock_execute_binary.assert_has_calls([
mock.call(
drivers.constants.WINPE_DISM,
drivers.constants.SYS_DISM,
[
'/Mount-Image',
f'/ImageFile:{local}',
Expand All @@ -78,7 +80,7 @@ def test_driver_wim(self, mock_createdirectories, mock_execute_binary,
shell=False,
),
mock.call(
drivers.constants.WINPE_DISM,
drivers.constants.SYS_DISM,
['/Unmount-Image', f'/MountDir:{cache}\\Drivers\\', '/Discard'],
shell=False,
),
Expand Down
Loading