예제 #1
0
 def test_restart(self):
     '''
     Test if it restart the specified service.
     '''
     with patch.object(rh_service, '_service_is_upstart', self._m_bool()):
         with patch.dict(rh_service.__salt__, {'cmd.retcode':
                                               self._m_bool(False)}):
             self.assertTrue(rh_service.restart('salt-api'))
예제 #2
0
 def test_restart(self):
     '''
     Test if it restart the specified service.
     '''
     with patch.object(rh_service, '_service_is_upstart', self._m_bool()):
         with patch.dict(rh_service.__salt__,
                         {'cmd.retcode': self._m_bool(False)}):
             self.assertTrue(rh_service.restart('salt-api'))
예제 #3
0
 def test_restart(self):
     """
     Test if it restart the specified service.
     """
     with patch.object(rh_service, "_service_is_upstart", self._m_bool()):
         with patch.dict(rh_service.__salt__,
                         {"cmd.retcode": self._m_bool(False)}):
             self.assertTrue(rh_service.restart("salt-api"))