Exemple #1
0
 def test_stop(self):
     """
     Test for Stops service via daemontools
     """
     mock = MagicMock(return_value=None)
     with patch.dict(daemontools.__salt__, {"file.touch": mock}):
         mock = MagicMock(return_value="")
         with patch.object(daemontools, "_service_path", mock):
             mock = MagicMock(return_value=False)
             with patch.dict(daemontools.__salt__, {"cmd.retcode": mock}):
                 self.assertTrue(daemontools.stop("name"))
Exemple #2
0
 def test_stop(self):
     '''
     Test for Stops service via daemontools
     '''
     mock = MagicMock(return_value=None)
     with patch.dict(daemontools.__salt__, {'file.touch': mock}):
         mock = MagicMock(return_value='')
         with patch.object(daemontools, '_service_path', mock):
             mock = MagicMock(return_value=False)
             with patch.dict(daemontools.__salt__, {'cmd.retcode': mock}):
                 self.assertTrue(daemontools.stop('name'))
Exemple #3
0
 def test_stop(self):
     '''
     Test for Stops service via daemontools
     '''
     mock = MagicMock(return_value=None)
     with patch.dict(daemontools.__salt__, {'file.touch': mock}):
         mock = MagicMock(return_value='')
         with patch.object(daemontools, '_service_path', mock):
             mock = MagicMock(return_value=False)
             with patch.dict(daemontools.__salt__, {'cmd.retcode': mock}):
                 self.assertTrue(daemontools.stop('name'))