Beispiel #1
0
    def test_enabled(self):
        '''
            Test to check to see if the named
            service is enabled to start on boot
        '''
        mock = MagicMock(side_effect=["AUTO_START", ""])
        with patch.dict(win_service.__salt__, {'cmd.run': mock}):
            self.assertTrue(win_service.enabled("salt"))

            self.assertFalse(win_service.enabled("salt"))
Beispiel #2
0
    def test_enabled(self):
        '''
            Test to check to see if the named
            service is enabled to start on boot
        '''
        mock = MagicMock(side_effect=["AUTO_START", ""])
        with patch.dict(win_service.__salt__, {'cmd.run': mock}):
            self.assertTrue(win_service.enabled("salt"))

            self.assertFalse(win_service.enabled("salt"))
Beispiel #3
0
 def test_enabled(self):
     '''
         Test to check to see if the named
         service is enabled to start on boot
     '''
     mock = MagicMock(side_effect=[{'StartType': 'Auto'},
                                   {'StartType': 'Disabled'}])
     with patch.object(win_service, 'info', mock):
         self.assertTrue(win_service.enabled('spongebob'))
         self.assertFalse(win_service.enabled('squarepants'))
Beispiel #4
0
 def test_enabled(self):
     '''
         Test to check to see if the named
         service is enabled to start on boot
     '''
     mock = MagicMock(side_effect=[{'StartType': 'Auto'},
                                   {'StartType': 'Disabled'}])
     with patch.object(win_service, 'info', mock):
         self.assertTrue(win_service.enabled('spongebob'))
         self.assertFalse(win_service.enabled('squarepants'))
Beispiel #5
0
 def test_enabled(self):
     """
         Test to check to see if the named
         service is enabled to start on boot
     """
     mock = MagicMock(side_effect=[{
         "StartType": "Auto"
     }, {
         "StartType": "Disabled"
     }])
     with patch.object(win_service, "info", mock):
         self.assertTrue(win_service.enabled("spongebob"))
         self.assertFalse(win_service.enabled("squarepants"))