def setUp(self): self.db_setup() self.tmpdir = tempfile.mkdtemp(suffix='.debsources-test') self.conf = mk_conf(self.tmpdir) self.conf['stages'] = self.TEST_STAGES self.longMessage = True self.maxDiff = None orig_sources = os.path.join(TEST_DATA_DIR, 'sources') dest_sources = self.conf['sources_dir'] shutil.copytree(orig_sources, dest_sources) mainlib.init_logging(self.conf, console_verbosity=logging.WARNING) obs, exts = mainlib.load_hooks(self.conf) self.conf['observers'], self.conf['file_exts'] = obs, exts self.archive = debmirror.SourceMirrorArchive( self.conf['mirror_archive_dir'])
def setUp(self): self.db_setup() self.tmpdir = tempfile.mkdtemp(suffix=".debsources-test") self.conf = mk_conf(Path(self.tmpdir)) self.conf["stages"] = self.TEST_STAGES self.longMessage = True self.maxDiff = None orig_sources = TEST_DATA_DIR / "sources" dest_sources = self.conf["sources_dir"] shutil.copytree(orig_sources, dest_sources) mainlib.init_logging(self.conf, console_verbosity=logging.WARNING) obs, exts = mainlib.load_hooks(self.conf) self.conf["observers"], self.conf["file_exts"] = obs, exts self.archive = debmirror.SourceMirrorArchive( self.conf["mirror_archive_dir"])
def do_update(self, stages=TEST_STAGES): """do a full update run in a virtual test environment""" mainlib.init_logging(self.conf, console_verbosity=logging.WARNING) obs, exts = mainlib.load_hooks(self.conf) self.conf['observers'], self.conf['file_exts'] = obs, exts updater.update(self.conf, self.session, stages)