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'}})
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" }})