Exemplo n.º 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'])
Exemplo n.º 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'
         ])
Exemplo n.º 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'
         ])
Exemplo n.º 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",
        ])