def setUp(self): super(TestSingletonAlarmService, self).setUp() self.threshold_eval = mock.Mock() self.evaluators = extension.ExtensionManager.make_test_instance([ extension.Extension('threshold', None, None, self.threshold_eval), ]) self.api_client = mock.MagicMock() self.singleton = service.SingletonAlarmService() self.singleton.tg = mock.Mock() self.singleton.evaluators = self.evaluators self.singleton.supported_evaluators = ['threshold']
def setUp(self): super(TestSingletonAlarmService, self).setUp() self.CONF = self.useFixture(fixture_config.Config()).conf self.setup_messaging(self.CONF) self.threshold_eval = mock.Mock() self.evaluators = extension.ExtensionManager.make_test_instance([ extension.Extension('threshold', None, None, self.threshold_eval), ]) self.api_client = mock.MagicMock() self.singleton = service.SingletonAlarmService() self.singleton.tg = mock.Mock() self.singleton.evaluators = self.evaluators self.singleton.supported_evaluators = ['threshold']
def setUp(self): super(TestSingletonAlarmService, self).setUp() self.threshold_eval = mock.Mock() self.extension_mgr = extension_tests.TestExtensionManager([ extension.Extension( 'threshold_eval', None, None, self.threshold_eval, ), ]) self.api_client = mock.MagicMock() self.singleton = service.SingletonAlarmService() self.singleton.tg = mock.Mock() self.singleton.extension_manager = self.extension_mgr