def tearDownZope(self, app): """Tear down Zope.""" if HAS_PLONE_5_2: from plone.testing import zope zope.uninstallProduct(app, 'collective.documentgenerator') else: z2.uninstallProduct(app, 'collective.documentgenerator') (stdout, stderr, st) = runCommand('%s/bin/soffice.sh stop' % os.getenv('PWD'))
def tearDownPloneSite(self, app): registry = getUtility(IRegistry) settings = registry.forInterface(IConnectorSettings) settings.connector_url = six.text_type(CONNECTOR_URL) handle = self.connector.get_handle() try: handle.removedir(self.testing_directory) except Exception as e: LOG.error('tearDownZope() failed ({})'.format(e)) zope.uninstallProduct(app, 'xmldirector.connector')
def tearDownZope(self, app): if not TEST_MIGRATION: return try: pkg_resources.get_distribution('plone.app.collection') zope.uninstallProduct(app, 'plone.app.collection') except pkg_resources.DistributionNotFound: pass zope.uninstallProduct(app, 'plone.app.blob') zope.uninstallProduct(app, 'Products.ATContentTypes') zope.uninstallProduct(app, 'Products.Archetypes')
def tearDownBasicProducts(self): """Tear down the minimal set of products """ with zopeApp() as app: uninstallProduct(app, 'Products.PluginIndexes') uninstallProduct(app, 'Products.OFSP') # It's possible for Five's _register_monkies and _meta_type_regs # global variables to contain duplicates. This causes an unecessary # error in the LayerCleanup layer's tear-down. Guard against that # here try: from OFS import metaconfigure except ImportError: # Zope <= 2.12 from Products.Five import fiveconfigure as metaconfigure metaconfigure._register_monkies = list( set(metaconfigure._register_monkies)) metaconfigure._meta_type_regs = list(set( metaconfigure._meta_type_regs))
def tearDownBasicProducts(self): """Tear down the minimal set of products """ with zopeApp() as app: uninstallProduct(app, 'Products.PluginIndexes') uninstallProduct(app, 'Products.OFSP') # It's possible for Five's _register_monkies and _meta_type_regs # global variables to contain duplicates. This causes an unecessary # error in the LayerCleanup layer's tear-down. Guard against that # here try: from OFS import metaconfigure except ImportError: # Zope <= 2.12 from Products.Five import fiveconfigure as metaconfigure metaconfigure._register_monkies = list( set(metaconfigure._register_monkies)) metaconfigure._meta_type_regs = list( set(metaconfigure._meta_type_regs))
def tearDownZope(self, app): # Uninstall products installed above zope.uninstallProduct(app, "collective.workspace")
def tearDown(self): zope.uninstallProduct(self.app, 'Products.CMFPlone') zope.uninstallProduct(self.app, 'Products.PythonScripts')