def test_validate(self): ''' Test for Check all services are monitored ''' mock = MagicMock(return_value=0) with patch.dict(monit.__salt__, {'cmd.retcode': mock}): self.assertTrue(monit.validate())
def test_validate(): """ Test for Check all services are monitored """ mock = MagicMock(return_value=0) with patch.dict(monit.__salt__, {"cmd.retcode": mock}): assert monit.validate()