def _get_api(self, path=None): package_zip = UninstallPackageZipBuilder( self.options["namespace"], self.project_config.project__package__api_version) return self.api_class(self, package_zip(), purge_on_delete=self.options["purge_on_delete"])
def _uninstall_dependency(self, dependency): self.logger.info("Uninstalling {}".format(dependency["namespace"])) package_zip = UninstallPackageZipBuilder( dependency["namespace"], self.project_config.project__package__api_version) api = self.api_class(self, package_zip(), purge_on_delete=self.options["purge_on_delete"]) return api()
def test_call(self): builder = UninstallPackageZipBuilder("testns", "1.0") self.assertIn("destructiveChanges.xml", builder.zf.namelist())
def test_init__missing_namespace(self): with self.assertRaises(ValueError): UninstallPackageZipBuilder(None, "1.0")