def repo_remote_del(self, global_conf=False): try: metadata_path = get_metadata_path(self.__config) metadata = Metadata('', metadata_path, self.__config, self.__repo_type) if metadata.delete_git_reference(): remote_del(self.__repo_type, global_conf) except Exception as e: log.error(e, class_name=REPOSITORY_CLASS_NAME) return
def test_delete_git_reference(self): m = Metadata(spec, self.test_dir, config, repotype) m.init() for url in Repo(m.path).remote().urls: self.assertNotEqual(url, '') self.assertTrue(m.delete_git_reference()) for url in Repo(m.path).remote().urls: self.assertEqual(url, '')