コード例 #1
0
ファイル: test_service.py プロジェクト: zxstar/salt
 def test_status(self):
     """
     Test to return the status for a service, returns the PID or an empty
     string if the service is running or not, pass a signature to use to
     find the service via ps
     """
     with patch.dict(service.__salt__,
                     {"status.pid": MagicMock(return_value=True)}):
         self.assertTrue(service.status("name"))
コード例 #2
0
ファイル: service_test.py プロジェクト: DaveQB/salt
 def test_status(self):
     '''
     Test to return the status for a service, returns the PID or an empty
     string if the service is running or not, pass a signature to use to
     find the service via ps
     '''
     with patch.dict(service.__salt__,
                     {'status.pid': MagicMock(return_value=True)}):
         self.assertTrue(service.status('name'))