예제 #1
0
 def test_retcode(self):
     '''
     Test for Run one nagios plugin and return retcode of the execution
     '''
     with patch.object(nagios, '_execute_cmd', return_value='A'):
         self.assertEqual(nagios.retcode('plugin', key_name='key'),
                          {'key': {'status': 'A'}})
예제 #2
0
파일: nagios_test.py 프로젝트: DaveQB/salt
 def test_retcode(self):
     '''
     Test for Run one nagios plugin and return retcode of the execution
     '''
     with patch.object(nagios, '_execute_cmd', return_value='A'):
         self.assertEqual(nagios.retcode('plugin', key_name='key'),
                          {'key': {'status': 'A'}})
예제 #3
0
 def test_retcode(self):
     """
     Test for Run one nagios plugin and return retcode of the execution
     """
     with patch.object(nagios, "_execute_cmd", return_value="A"):
         self.assertEqual(nagios.retcode("plugin", key_name="key"),
                          {"key": {
                              "status": "A"
                          }})