Esempio n. 1
0
 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"])
Esempio n. 2
0
 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()
Esempio n. 3
0
 def test_call(self):
     builder = UninstallPackageZipBuilder("testns", "1.0")
     self.assertIn("destructiveChanges.xml", builder.zf.namelist())
Esempio n. 4
0
 def test_init__missing_namespace(self):
     with self.assertRaises(ValueError):
         UninstallPackageZipBuilder(None, "1.0")