Example #1
0
 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'])
Example #2
0
 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'
         ])
Example #3
0
 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'
         ])
Example #4
0
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",
        ])