def test_summary(self): ''' Test for Display a summary from monit ''' mock = MagicMock(side_effect=['daemon is not running', 'A\nB\nC\nD\nE']) with patch.dict(monit.__salt__, {'cmd.run': mock}): self.assertEqual(monit.summary(), {'monit': 'daemon is not running', 'result': False}) self.assertEqual(monit.summary(), {})
def test_summary(self): ''' Test for Display a summary from monit ''' mock = MagicMock(side_effect=['daemon is not running', 'A\nB\nC\nD\nE']) with patch.dict(monit.__salt__, {'cmd.run': mock}): self.assertEqual(monit.summary(), {'monit': 'daemon is not running', 'result': False}) self.assertEqual(monit.summary(), {})
def test_summary(): """ Test for Display a summary from monit """ mock = MagicMock(side_effect=["daemon is not running", "A\nB\nC\nD\nE"]) with patch.dict(monit.__salt__, {"cmd.run": mock}): assert monit.summary() == { "monit": "daemon is not running", "result": False } assert monit.summary() == {}