Example #1
0
    def setup_config(self, prefix=None):
        config = DotDict()
        config.chatty_rules = False
        config.chatty = False
        config.tag = 'test.rule'
        config.action = 'apply_all_rules'
        config.rules_list = DotDict()
        config.rules_list.class_list = [
            ('TestRuleTestLaughable', StatsdRuleBenchmarkWrapper,
             'TestRuleTestLaughable'),
            ('TestRuleTestDangerous', StatsdRuleBenchmarkWrapper,
             'TestRuleTestDangerous')
        ]
        config.TestRuleTestLaughable = DotDict()
        config.TestRuleTestLaughable.laughable = 'wilma'
        config.TestRuleTestLaughable.statsd_class = StatsClient
        config.TestRuleTestLaughable.statsd_host = 'some_statsd_host'
        config.TestRuleTestLaughable.statsd_port = 3333
        config.TestRuleTestLaughable.statsd_prefix = prefix if prefix else ''
        config.TestRuleTestLaughable.wrapped_object_class = TestRuleTestLaughable
        config.TestRuleTestLaughable.active_list = 'act'

        config.TestRuleTestDangerous = DotDict()
        config.TestRuleTestDangerous.dangerous = 'dwight'
        config.TestRuleTestDangerous.statsd_class = StatsClient
        config.TestRuleTestDangerous.statsd_host = 'some_statsd_host'
        config.TestRuleTestDangerous.statsd_port = 3333
        config.TestRuleTestDangerous.statsd_prefix = prefix if prefix else ''
        config.TestRuleTestDangerous.wrapped_object_class = TestRuleTestDangerous
        config.TestRuleTestDangerous.active_list = 'act'

        return config
    def setup_config(self, prefix=None):
        config = DotDict()
        config.chatty_rules = False
        config.chatty = False
        config.tag = 'test.rule'
        config.action = 'apply_all_rules'
        config.rules_list = DotDict()
        config.rules_list.class_list = [
            (
                'TestRuleTestLaughable',
                StatsdRuleBenchmarkWrapper,
                'TestRuleTestLaughable'
            ),
            (
                'TestRuleTestDangerous',
                StatsdRuleBenchmarkWrapper,
                'TestRuleTestDangerous'
            )
        ]
        config.TestRuleTestLaughable = DotDict()
        config.TestRuleTestLaughable.laughable = 'wilma'
        config.TestRuleTestLaughable.statsd_class =  StatsClient
        config.TestRuleTestLaughable.statsd_host = 'some_statsd_host'
        config.TestRuleTestLaughable.statsd_port =  3333
        config.TestRuleTestLaughable.statsd_prefix = prefix if prefix else ''
        config.TestRuleTestLaughable.wrapped_object_class = TestRuleTestLaughable
        config.TestRuleTestLaughable.active_list = 'act'

        config.TestRuleTestDangerous = DotDict()
        config.TestRuleTestDangerous.dangerous = 'dwight'
        config.TestRuleTestDangerous.statsd_class =  StatsClient
        config.TestRuleTestDangerous.statsd_host = 'some_statsd_host'
        config.TestRuleTestDangerous.statsd_port =  3333
        config.TestRuleTestDangerous.statsd_prefix = prefix if prefix else ''
        config.TestRuleTestDangerous.wrapped_object_class = TestRuleTestDangerous
        config.TestRuleTestDangerous.active_list = 'act'

        return config