def make_datacube_config(self, test_name, config):
        """Make a datacube config file using a template and test info."""

        template = config.get(test_name, 'datacube_config_template')
        (template_dir, template_name) = os.path.split(template)

        output_name = config.get(test_name, 'datacube_config_name')

        try:
            updates = {'dbname': self.dbname,
                       'temp_dir': self.temp_dir,
                       'tile_root': self.tile_dir}
            dbutil.update_config_file2(updates, template_dir, self.test_dir,
                                       template_name, output_name)

        except __HOLE__ as e:
            raise AssertionError('Unable to update datacube config file: %s' %
                                 e.strerror)
dataset/ETHPy150Open GeoscienceAustralia/agdc/tests/systest.py/Systest.make_datacube_config