def setUp(self): super(SenlinTestCase, self).setUp() self.setup_logging() scheduler.ENABLE_SLEEP = False self.useFixture(fixtures.MonkeyPatch( 'senlin.common.exception._FATAL_EXCEPTION_FORMAT_ERRORS', True)) def enable_sleep(): scheduler.ENABLE_SLEEP = True self.addCleanup(enable_sleep) self.addCleanup(cfg.CONF.reset) messaging.setup("fake://", optional=True) self.addCleanup(messaging.cleanup) utils.setup_dummy_db() self.addCleanup(utils.reset_dummy_db)