コード例 #1
0
 def test_stop(self):
     '''
     Test if it stop 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.stop('salt-api'))
コード例 #2
0
ファイル: rh_service_test.py プロジェクト: bryson/salt
 def test_stop(self):
     '''
     Test if it stop 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.stop('salt-api'))
コード例 #3
0
 def test_stop(self):
     """
     Test if it stop 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.stop("salt-api"))