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