Exemple #1
0
 def test_disable(self):
     '''
         Test to disable the named service to start at boot
     '''
     mock = MagicMock(return_value=False)
     with patch.dict(win_service.__salt__, {'cmd.retcode': mock}):
         self.assertTrue(win_service.disable("salt"))
 def test_disable(self):
     '''
         Test to disable the named service to start at boot
     '''
     mock = MagicMock(return_value=False)
     with patch.dict(win_service.__salt__, {'cmd.retcode': mock}):
         self.assertTrue(win_service.disable("salt"))
Exemple #3
0
 def test_disable(self):
     '''
         Test to disable the named service to start at boot
     '''
     mock_modify = MagicMock(return_value=True)
     mock_info = MagicMock(return_value={'StartType': 'Disabled'})
     with patch.object(win_service, 'modify', mock_modify):
         with patch.object(win_service, 'info', mock_info):
             self.assertTrue(win_service.disable('spongebob'))
Exemple #4
0
 def test_disable(self):
     """
         Test to disable the named service to start at boot
     """
     mock_modify = MagicMock(return_value=True)
     mock_info = MagicMock(return_value={"StartType": "Disabled"})
     with patch.object(win_service, "modify", mock_modify):
         with patch.object(win_service, "info", mock_info):
             self.assertTrue(win_service.disable("spongebob"))
Exemple #5
0
 def test_disable(self):
     '''
         Test to disable the named service to start at boot
     '''
     mock_modify = MagicMock(return_value=True)
     mock_info = MagicMock(return_value={'StartType': 'Disabled'})
     with patch.object(win_service, 'modify', mock_modify):
         with patch.object(win_service, 'info', mock_info):
             self.assertTrue(win_service.disable('spongebob'))