def test_loglevel_no_manage_logConf(self): self.flags(healthnmon_manage_log_config="dummyfile") try: log.healthnmon_manage_setup() except Exception: self.assert_(True) # raise exception
def test_loglevel_INFO_from_manage_logConf(self): log.healthnmon_manage_setup() self.log.info("baz") self.assert_(True) # didn't raise exception self.assertEqual(self.log.logger.level, self.log.logger.getEffectiveLevel())
def test_loglevel_manage_logConf_None(self): self.flags(healthnmon_manage_log_config="") log.healthnmon_manage_setup() self.assert_(True) # do not raise exception
def test_loglevel_INFO_from_manage_logConf(self): log.healthnmon_manage_setup() self.log.info("baz") self.assert_(True) # didn't raise exception self.assertEqual( self.log.logger.level, self.log.logger.getEffectiveLevel())