def setUpBasicProducts(self): """Install a minimal set of products required for Zope 2. """ with zopeApp() as app: installProduct(app, 'Products.PluginIndexes') installProduct(app, 'Products.OFSP')
def setUpZope(self, app, configurationContext): # Load any other ZCML that is required for your tests. # The z3c.autoinclude feature is disabled in the Plone fixture base # layer. import plone.restapi self.loadZCML(package=plone.restapi) import collective.elasticsearch self.loadZCML(package=collective.elasticsearch) import plone.app.fhirfield self.loadZCML(package=plone.app.fhirfield) import collective.MockMailHost self.loadZCML(package=collective.MockMailHost) import collective.fhirpath self.loadZCML(package=collective.fhirpath) # initialize method not calling automatically z2.installProduct(app, "collective.fhirpath") # Load Custom if str(EXAMPLE_RESTAPI_DIR) not in sys.path[:]: sys.path.append(str(EXAMPLE_RESTAPI_DIR)) xmlconfig.string(TEST_ZCML, context=configurationContext)
def setUpZope(self, app, configurationContext): # Load any other ZCML that is required for your tests. # The z3c.autoinclude feature is disabled in the Plone fixture base # layer. import euphorie.client.tests import euphorie.deployment.tests self.loadZCML("configure.zcml", package=euphorie.deployment) self.loadZCML("overrides.zcml", package=euphorie.deployment) self.loadZCML("configure.zcml", package=euphorie.client.tests) self.loadZCML("configure.zcml", package=euphorie.deployment.tests) zope.installProduct(app, "Products.membrane") self.loadZCML(self.saconfig_filename, package=euphorie.client.tests) engine = Session.bind @event.listens_for(engine, "connect") def do_connect(dbapi_connection, connection_record): # disable pysqlite's emitting of the BEGIN statement entirely. # also stops it from emitting COMMIT before any DDL. dbapi_connection.isolation_level = None @event.listens_for(engine, "begin") def do_begin(conn): # emit our own BEGIN conn.execute("BEGIN") # Start fresh self.testTearDown() default_zpublisher_encoding("utf-8")
def setUpZope(self, app, configurationContext): # Load ZCML import collective.workspace xmlconfig.file("configure.zcml", collective.workspace, context=configurationContext) zope.installProduct(app, "collective.workspace")
def setUpZope(self, app, configurationContext): # Load any other ZCML that is required for your tests. # The z3c.autoinclude feature is disabled in the Plone fixture base # layer. import plone.restapi import collective.elastic.plone self.loadZCML(package=plone.restapi) self.loadZCML(package=collective.elastic.plone) zope.installProduct(app, "collective.elastic.plone")
def setUpZope(self, app, configurationContext): import plone.restapi xmlconfig.file("configure.zcml", plone.restapi, context=configurationContext) xmlconfig.file("testing.zcml", plone.restapi, context=configurationContext) zope.installProduct(app, "plone.restapi")
def setUpZope(self, app, configurationContext): import collective.lineage try: import plone.app.contenttypes self['has_pact'] = True except ImportError: self['has_pact'] = False self.loadZCML(package=collective.lineage) if self['has_pact']: self.loadZCML(package=plone.app.contenttypes) if self['has_pact']: zope.installProduct(app, 'plone.app.contenttypes')
def setUpZope(self, app, configurationContext): import plone.restapi xmlconfig.file("configure.zcml", plone.restapi, context=configurationContext) xmlconfig.file("testing.zcml", plone.restapi, context=configurationContext) self.loadZCML(package=collective.MockMailHost) zope.installProduct(app, "plone.restapi")
def setUpZope(self, app, configurationContext): # Load any other ZCML that is required for your tests. # The z3c.autoinclude feature is disabled in the Plone fixture base # layer. request = aq_get(app, 'REQUEST') request.environ['HTTP_ACCEPT_LANGUAGE'] = 'de' self.loadZCML(package=collective.sidebar) self.loadZCML(package=plonetheme.tokyo) self.loadZCML(package=plonetheme.siguv) self.loadZCML(package=nva.footerviewlet) self.loadZCML(package=nva.testbootstrap) installProduct(app, 'collective.sidebar') installProduct(app, 'plonetheme.tokyo') installProduct(app, 'plonetheme.siguv') installProduct(app, 'nva.footerviewlet') installProduct(app, 'nva.testbootstrap')
def setUpZope(self, app, configurationContext): for locales in self._get_robot_variable('REGISTER_TRANSLATIONS'): if locales and os.path.isdir(locales): from zope.i18n.zcml import registerTranslations registerTranslations(configurationContext, locales) self['state'].append(locales) for name in self._get_robot_variable('META_PACKAGES'): if name not in sys.modules: __import__(name) package = sys.modules[name] xmlconfig.file('meta.zcml', package, context=configurationContext) self['state'].append(name) for name in self._get_robot_variable('CONFIGURE_PACKAGES'): if name not in sys.modules: __import__(name) package = sys.modules[name] xmlconfig.file( 'configure.zcml', package, context=configurationContext ) self['state'].append(name) for name in self._get_robot_variable('OVERRIDE_PACKAGES'): if name not in sys.modules: __import__(name) package = sys.modules[name] xmlconfig.includeOverrides( configurationContext, 'overrides.zcml', package=package ) self['state'].append(name) for name in self._get_robot_variable('INSTALL_PRODUCTS'): if name not in sys.modules: __import__(name) zope_testing.installProduct(app, name) self['state'].append(name)
def setUpZope(self, app, configurationContext): if not TEST_MIGRATION: return # prepare installing Products.ATContentTypes self.loadZCML(package=Products.ATContentTypes) zope.installProduct(app, 'Products.Archetypes') zope.installProduct(app, 'Products.ATContentTypes') zope.installProduct(app, 'plone.app.blob') # prepare installing plone.app.collection try: pkg_resources.get_distribution('plone.app.collection') zope.installProduct(app, 'plone.app.collection') except pkg_resources.DistributionNotFound: pass # prepare installing plone.app.contenttypes zope.installProduct(app, 'Products.DateRecurringIndex') import plone.app.contenttypes self.loadZCML(package=plone.app.contenttypes) import plone.app.referenceablebehavior self.loadZCML(package=plone.app.referenceablebehavior)
def setUpProducts(self): """Install all old-style products listed in the the ``products`` tuple of this class. """ for prd, config in self.products: installProduct(self["app"], prd)
def setUpZope(self, app, configurationContext): auto.CSRF_DISABLED = True self.loadZCML(package=pas.plugins.authomatic) installProduct(app, "pas.plugins.authomatic")
def setUpZope(self, app, configurationContext): super(BaseLayer, self).setUpZope(app, configurationContext) import bika.lims import senaite.core import senaite.app.listing import senaite.app.spotlight import senaite.app.supermodel import senaite.impress import senaite.lims import senaite.instruments import Products.TextIndexNG3 self.loadZCML(package=bika.lims) self.loadZCML(package=senaite.core) self.loadZCML(package=senaite.app.listing) self.loadZCML(package=senaite.app.spotlight) self.loadZCML(package=senaite.app.supermodel) self.loadZCML(package=senaite.impress) self.loadZCML(package=senaite.lims) self.loadZCML(package=senaite.instruments) self.loadZCML(package=Products.TextIndexNG3) zope.installProduct(app, "bika.lims") zope.installProduct(app, "senaite.core") zope.installProduct(app, "senaite.app.listing") zope.installProduct(app, "senaite.app.spotlight") zope.installProduct(app, "senaite.app.supermodel") zope.installProduct(app, "senaite.impress") zope.installProduct(app, "senaite.lims") zope.installProduct(app, "senaite.instruments") zope.installProduct(app, "Products.TextIndexNG3")
def setUp(self): self.app = self.layer['app'] self.folder = self.app zope.installProduct(self.app, 'Products.PythonScripts') zope.installProduct(self.app, 'Products.CMFPlone')
def setUpZope(self, app, configurationContext): # Load any other ZCML that is required for your tests. # The z3c.autoinclude feature is disabled in the Plone fixture base # layer. self.loadZCML(package=Products.PlonePAS) zope_testing.installProduct(app, 'Products.PlonePAS')
def setUpZope(self, app, configurationContext): super(BaseLayer, self).setUpZope(app, configurationContext) # Load ZCML import Products.TextIndexNG3 import bika.lims import senaite.core import senaite.app.listing import senaite.app.spotlight import senaite.databox import senaite.impress import senaite.lims self.loadZCML(package=Products.TextIndexNG3) self.loadZCML(package=bika.lims) self.loadZCML(package=senaite.core) self.loadZCML(package=senaite.app.listing) self.loadZCML(package=senaite.app.spotlight) self.loadZCML(package=senaite.databox) self.loadZCML(package=senaite.impress) self.loadZCML(package=senaite.lims) # Install product and call its initialize() function zope.installProduct(app, "Products.TextIndexNG3") zope.installProduct(app, "bika.lims") zope.installProduct(app, "senaite.core") zope.installProduct(app, "senaite.app.listing") zope.installProduct(app, "senaite.app.spotlight") zope.installProduct(app, "senaite.databox") zope.installProduct(app, "senaite.impress") zope.installProduct(app, "senaite.lims")