Ejemplo n.º 1
0
    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",
        )
Ejemplo n.º 2
0
    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",
        )