def test_delete_repo_file(self): """ Tests that calling delete_repo_file deletes the repo file. """ repolib.bind(TEST_REPO_FILENAME, TEST_MIRROR_LIST_FILENAME, TEST_KEYS_DIR, TEST_CERT_DIR, REPO_ID, REPO_NAME, ['http://pulp'], {}, None, ENABLED, LOCK) self.assertTrue(os.path.exists(TEST_REPO_FILENAME)) repolib.delete_repo_file(TEST_REPO_FILENAME, LOCK) self.assertFalse(os.path.exists(TEST_REPO_FILENAME))
def test_delete_repo_file(self): """ Tests that calling delete_repo_file deletes the repo file. """ repolib.bind(self.TEST_REPO_FILENAME, self.TEST_MIRROR_LIST_FILENAME, self.TEST_KEYS_DIR, self.TEST_CERT_DIR, REPO_ID, REPO_NAME, ['http://pulp'], {}, None, ENABLED, self.LOCK) self.assertTrue(os.path.exists(self.TEST_REPO_FILENAME)) repolib.delete_repo_file(self.TEST_REPO_FILENAME, self.LOCK) self.assertFalse(os.path.exists(self.TEST_REPO_FILENAME))
def clean(self, conduit): """ Clean up artifacts associated with the handler. @param conduit: A handler conduit. @type conduit: L{pulp.agent.lib.conduit.Conduit} @return: A clean report. @rtype: L{CleanReport} """ log.info('clean') report = CleanReport() cfg = conduit.get_consumer_config().graph() repolib.delete_repo_file(cfg.filesystem.repo_file) report.set_succeeded() return report