예제 #1
0
파일: test_service.py 프로젝트: zxstar/salt
 def test_stop(self):
     """
     Test to stop the specified service
     """
     with patch.object(os.path, "join", return_value="A"):
         with patch.object(service, "run", MagicMock(return_value=True)):
             self.assertTrue(service.stop("name"))
예제 #2
0
 def test_stop(self):
     '''
     Test to stop the specified service
     '''
     with patch.object(os.path, 'join', return_value='A'):
         with patch.object(service, 'run', MagicMock(return_value=True)):
             self.assertTrue(service.stop('name'))
예제 #3
0
 def test_stop(self):
     '''
     Test to stop the specified service
     '''
     with patch.object(os.path, 'join', return_value='A'):
         with patch.dict(service.__salt__,
                         {'cmd.retcode': MagicMock(return_value=False)}):
             self.assertTrue(service.stop('name'))
예제 #4
0
파일: service_test.py 프로젝트: DaveQB/salt
 def test_stop(self):
     '''
     Test to stop the specified service
     '''
     with patch.object(os.path, 'join', return_value='A'):
         with patch.dict(service.__salt__, {'cmd.retcode':
                                            MagicMock(return_value=False)}):
             self.assertTrue(service.stop('name'))