Ejemplo n.º 1
0
    def setUpClass(cls):

        template_dir_path = '%s/templates/general' % utils.get_resources_dir()
        cls.template_yamls = file_utils.load_yaml_files(template_dir_path)
        cls.first_template = cls.template_yamls[0]

        cls._hide_useless_logging_messages()
Ejemplo n.º 2
0
    def _load_templates_files(self, conf):

        templates_dir = conf.evaluator.templates_dir
        template_defs = file_utils.load_yaml_files(templates_dir)

        for template_def in template_defs:
            self.add_template(template_def)
Ejemplo n.º 3
0
    def setUpClass(cls):

        cls.conf = cfg.ConfigOpts()
        cls.conf.register_opts(cls.OPTS, group='evaluator')

        templates_dir_path = cls.conf.evaluator.templates_dir
        cls.template_defs = file_utils.load_yaml_files(templates_dir_path)

        cls.scenario_repository = ScenarioRepository(cls.conf)
    def setUpClass(cls):

        cls.conf = cfg.ConfigOpts()
        cls.conf.register_opts(cls.OPTS, group='evaluator')

        templates_dir_path = cls.conf.evaluator.templates_dir
        cls.template_defs = file_utils.load_yaml_files(templates_dir_path)

        cls.scenario_repository = ScenarioRepository(cls.conf)
Ejemplo n.º 5
0
    def test_static_datasources_loader(self):
        # Setup
        total_static_datasources = \
            os.listdir(self.conf.static_physical.directory)

        # Action
        static_configs = file_utils.load_yaml_files(
            self.conf.static_physical.directory)

        # Test assertions
        # -1 is because there are 2 files and a folder in static_datasource_dir
        self.assertEqual(
            len(total_static_datasources) - 1, len(static_configs))
Ejemplo n.º 6
0
    def test_static_datasources_loader(self):
        # Setup
        total_static_datasources = \
            os.listdir(self.conf.static_physical.directory)

        # Action
        static_configs = file_utils.load_yaml_files(
            self.conf.static_physical.directory)

        # Test assertions
        # -1 is because there are 2 files and a folder in static_datasource_dir
        self.assertEqual(len(total_static_datasources) - 1,
                         len(static_configs))
Ejemplo n.º 7
0
    def setUpClass(cls):

        template_dir_path = '%s/templates/general' % utils.get_resources_dir()
        cls.templates = file_utils.load_yaml_files(template_dir_path)
        cls.first_template = cls.templates[0]