def test_get_parser_from_config_default(self): config = { "something": "something", "other something": ["thing1", "thing2"], } attributes = {"nothing": 0} self.assertEqual( scalyr_util.get_parser_from_config(config, attributes, "default_parser"), "default_parser", )
def test_get_parser_from_config_hierarchy3(self): config = { "something": "something", "other something": ["thing1", "thing2"], "attributes": {}, } attributes = { "nothing": 0, "parser": "attributes_parser", } self.assertEqual( scalyr_util.get_parser_from_config(config, attributes, "default_parser"), "attributes_parser", )