def test_remove_feature_with_extras(self): ''' Test uninstalling a capability with DISM ''' mock = MagicMock() with patch.dict(dism.__salt__, {'cmd.run_all': mock}): dism.remove_feature('sponge', True) mock.assert_called_once_with( ['DISM', '/Quiet', '/Online', '/Disable-Feature', '/FeatureName:sponge', '/Remove', '/NoRestart'])
def test_remove_feature_with_extras(self): ''' Test uninstalling a capability with DISM ''' mock = MagicMock() with patch.dict(dism.__salt__, {'cmd.run_all': mock}): dism.remove_feature('sponge', True) mock.assert_called_once_with([ 'DISM', '/Quiet', '/Online', '/Disable-Feature', '/FeatureName:sponge', '/Remove', '/NoRestart' ])
def test_remove_feature(self): ''' Test uninstalling a capability with DISM ''' mock = MagicMock() with patch.dict(dism.__salt__, {'cmd.run_all': mock}): dism.remove_feature("test") mock.assert_called_once_with([ dism.bin_dism, '/Quiet', '/Online', '/Disable-Feature', '/FeatureName:test', '/NoRestart' ])
def test_remove_feature(): """ Test uninstalling a capability with DISM """ mock = MagicMock() with patch.dict(dism.__salt__, {"cmd.run_all": mock}): dism.remove_feature("test") mock.assert_called_once_with([ dism.bin_dism, "/Quiet", "/Online", "/Disable-Feature", "/FeatureName:test", "/NoRestart", ])