Ejemplo n.º 1
0
	def setUpZope(self, app, configurationContext):
		# Load ZCML
		import camara.policy
		xmlconfig.file('configure.zcml',
			camara.policy,
			context=configurationContext
		)
Ejemplo n.º 2
0
    def setUpZope(self, app, configurationContext):

        # prepare installing Products.ATContentTypes
        import Products.ATContentTypes
        self.loadZCML(package=Products.ATContentTypes)

        z2.installProduct(app, 'Products.Archetypes')
        z2.installProduct(app, 'Products.ATContentTypes')
        z2.installProduct(app, 'plone.app.blob')

        # prepare installing plone.app.collection
        try:
            pkg_resources.get_distribution('plone.app.collection')
            z2.installProduct(app, 'plone.app.collection')
        except pkg_resources.DistributionNotFound:
            pass

        # prepare installing plone.app.contenttypes
        z2.installProduct(app, 'Products.DateRecurringIndex')

        import plone.app.contenttypes
        xmlconfig.file(
            'configure.zcml',
            plone.app.contenttypes,
            context=configurationContext
        )
 def setUpZope(self, app, configurationContext):
     # Load ZCML for this package
     import collective.contentrules.subscription
     xmlconfig.file('configure.zcml',
                    collective.contentrules.subscription,
                    context=configurationContext)
     z2.installProduct(app, 'collective.contentrules.subscription')
Ejemplo n.º 4
0
    def setUp(self):
        self['configurationContext'] = zca.stackConfigurationContext(
            self.get('configurationContext'))

        import ftwbook.graphicblock.tests
        xmlconfig.file('tests.zcml', ftwbook.graphicblock.tests,
                       context=self['configurationContext'])
 def setUpZope(self, app, configurationContext):
     # Load ZCML for this package
     import collective.analyticspanel
     xmlconfig.file('configure.zcml',
                    collective.analyticspanel,
                    context=configurationContext)
     z2.installProduct(app, 'collective.analyticspanel')
Ejemplo n.º 6
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML for this package
     import misitio.policy
     xmlconfig.file('configure.zcml',
                    misitio.policy,
                    context=configurationContext)
     ztc.installProduct('Products.CMFPlacefulWorkflow')
Ejemplo n.º 7
0
    def setUpZope(self, app, configurationContext):
        # Load ZCML
        import my315ok.socialorgnization
#        import xtshzz.policy
#        self.loadZCML(package=xtshzz.policy)
  
        xmlconfig.file('configure.zcml', my315ok.socialorgnization, context=configurationContext)        
Ejemplo n.º 8
0
    def setUpZope(self, app, configurationContext):
        # Load ZCML
        import ftw.footer

        xmlconfig.file('configure.zcml', ftw.footer,
                       context=configurationContext)
        z2.installProduct(app, 'ftw.footer')
Ejemplo n.º 9
0
 def setUpZope(self, app, configurationContext):
     import plone.app.robotframework.tests
     xmlconfig.file(
         '_profiles.zcml',
         plone.app.robotframework.tests,
         context=configurationContext
     )
Ejemplo n.º 10
0
    def setUpZope(self, app, configurationContext):
        # Load ZCML
        import plone.jsonapi.core
        xmlconfig.file('configure.zcml', plone.jsonapi.core, context=configurationContext)

        # Install product and call its initialize() function
        z2.installProduct(app, 'plone.jsonapi.core')
Ejemplo n.º 11
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML for this package
     import collective.jsconfiguration
     xmlconfig.file('configure.zcml',
                    collective.externalizelink,
                    context=configurationContext)
     z2.installProduct(app, 'collective.externalizelink')
Ejemplo n.º 12
0
 def setUpZope(self, app, configurationContext):
     # load ZCML
     import plone.protect
     xmlconfig.file('configure.zcml', plone.protect,
                    context=configurationContext)
     xmlconfig.file('test.zcml', plone.protect.tests,
                    context=configurationContext)
Ejemplo n.º 13
0
    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)

        for name in self._get_robot_variable('META_PACKAGES'):
            if not name in sys.modules:
                __import__(name)
            package = sys.modules[name]
            xmlconfig.file('meta.zcml', package,
                           context=configurationContext)

        for name in self._get_robot_variable('CONFIGURE_PACKAGES'):
            if not name in sys.modules:
                __import__(name)
            package = sys.modules[name]
            xmlconfig.file('configure.zcml', package,
                           context=configurationContext)

        for name in self._get_robot_variable('OVERRIDE_PACKAGES'):
            if not name in sys.modules:
                __import__(name)
            package = sys.modules[name]
            xmlconfig.includeOverrides(
                configurationContext, 'overrides.zcml', package=package)

        for name in self._get_robot_variable('INSTALL_PRODUCTS'):
            if not name in sys.modules:
                __import__(name)
            z2.installProduct(app, name)
Ejemplo n.º 14
0
    def setUpZope(self, app, configurationContext):
        # Load ZCML

        import ftw.contenttemplates
        xmlconfig.file('configure.zcml',
                       ftw.contenttemplates,
                       context=configurationContext)
Ejemplo n.º 15
0
 def testView(self):
     self.assertEqual(
         component.queryMultiAdapter((ob, request), name='test'), None)
     xmlconfig.file("xmlrpc.zcml", xmlrpc.tests)
     view = component.queryMultiAdapter((ob, request), name='test')
     self.assert_(V1 in view.__class__.__bases__)
     self.assert_(xmlrpc.MethodPublisher in view.__class__.__bases__)
Ejemplo n.º 16
0
 def setUp(self):
     self['configurationContext'] = context = \
         zca.stackConfigurationContext(self.get('configurationContext'))
     import plone.z3cform
     xmlconfig.file('testing.zcml', plone.z3cform, context=context)
     import z3c.form
     xmlconfig.file('configure.zcml', z3c.form, context=context)
Ejemplo n.º 17
0
        def setUp(self):
            import collective.js.speakjs
            xmlconfig.file('configure.zcml', collective.js.speakjs,
                           context=self['configurationContext'])

            with ploneSite() as portal:
                applyProfile(portal, 'collective.js.speakjs:default')
Ejemplo n.º 18
0
    def setUp(self):
        import collective.taskqueue
        xmlconfig.file('configure.zcml', collective.taskqueue,
                       context=self['configurationContext'])

        # Configure
        config = getConfiguration()
        config.product_config = {'collective.taskqueue': {'queue': self.queue}}
        taskqueue.reset()

        # Define logging request handler to replace ZPublisher
        def logging_handler(app, request, response):
            logger.info(request.getURL() + request.get("PATH_INFO"))
            response.stdout.write('HTTP/1.1 204\r\n')
            response.stdout.close()

        # Define ZPublisher-based request handler to be used with zserver
        def zserver_handler(app, request, response):
            from ZPublisher import publish_module
            publish_module(app, request=request, response=response)

        # Create TaskQueueServer
        from collective.taskqueue.server import TaskQueueServer
        if not self.zserver_enabled:
            self['server'] = TaskQueueServer(queue=self.queue,
                                             handler=logging_handler)
        else:
            self['server'] = TaskQueueServer(queue=self.queue,
                                             handler=zserver_handler,
                                             concurrent_limit=0)
Ejemplo n.º 19
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML for this package
     import rer.sitesearch
     xmlconfig.file('configure.zcml',
                    rer.sitesearch,
                    context=configurationContext)
     z2.installProduct(app, 'rer.sitesearch')
Ejemplo n.º 20
0
    def setUpZope(self, app, configurationContext):
        # Load ZCML
        import ftw.portlet.clock

        xmlconfig.file(
            'configure.zcml', ftw.portlet.clock,
                context=configurationContext)
Ejemplo n.º 21
0
 def setUpZope(self, app, configurationContext):
     super(PloneAppContentAT, self).setUpZope(app, configurationContext)
     import Products.ATContentTypes
     xmlconfig.file('configure.zcml',
                    Products.ATContentTypes,
                    context=configurationContext)
     z2.installProduct(app, 'Products.ATContentTypes')
Ejemplo n.º 22
0
 def setUpZope(self, app, configurationContext):
     import Products.CMFPlone
     xmlconfig.file(
         'configure.zcml',
         Products.CMFPlone,
         context=configurationContext
     )
Ejemplo n.º 23
0
    def setUpZope(self, app, configurationContext):

        # Load ZCML
        import eastofeaton.logopanel
        xmlconfig.file('configure.zcml',
                       eastofeaton.logopanel,
                       context=configurationContext)
Ejemplo n.º 24
0
    def setUpZope(self, app, configurationContext):

        # Patch effectiveDate, so our FtwCalendarwidget is used
        from ftw.calendarwidget.browser.widgets import FtwCalendarWidget
        from Products.ATContentTypes.content.base import registerATCT
        from Products.ATContentTypes.content.document import ATDocument
        from Products.ATContentTypes.content.document import PROJECTNAME

        ATDocument.schema['effectiveDate'].widget = FtwCalendarWidget(
                label='MyDate'
            )

        registerATCT(ATDocument, PROJECTNAME)

        # Load ZCML

        xmlconfig.file('configure.zcml',
            ftw.calendarwidget,
            context=configurationContext)
        xmlconfig.file('configure.zcml',
            collective.js.jqueryui,
            context=configurationContext)

        # installProduct() is *only* necessary for packages outside
        # the Products.* namespace which are also declared as Zope 2 products,
        # using <five:registerPackage /> in ZCML.
        z2.installProduct(app, 'ftw.calendarwidget')
        z2.installProduct(app, 'collective.js.jqueryui')
Ejemplo n.º 25
0
 def setUpZope(self, app, configurationContext):
     import plone.rest
     xmlconfig.file(
         'configure.zcml',
         plone.rest,
         context=configurationContext
     )
Ejemplo n.º 26
0
    def setUp(self):
        import zope.component
        context = xmlconfig.file('meta.zcml', zope.component)
        xmlconfig.file('configure.zcml', zope.component, context=context)

        import plone.event
        xmlconfig.file('configure.zcml', plone.event, context=context)
Ejemplo n.º 27
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML for this package
     import aws.authrss
     xmlconfig.file('configure.zcml',
                    aws.authrss,
                    context=configurationContext)
     return
Ejemplo n.º 28
0
    def setUpZope(self, app, configurationContext):

        # Load ZCML
        import eastofeaton.pay2plone
        xmlconfig.file('configure.zcml',
                       eastofeaton.pay2plone,
                       context=configurationContext)
Ejemplo n.º 29
0
    def testSetUp(self):
        import ftw.book.tests
        self['configurationContext'] = zca.stackConfigurationContext(
            self.get('configurationContext'))

        xmlconfig.file('latex.zcml', ftw.book.tests,
                       context=self['configurationContext'])
Ejemplo n.º 30
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import redomino.tokenrole
     xmlconfig.file('configure.zcml',
                    redomino.tokenrole,
                    context=configurationContext
                   )
Ejemplo n.º 31
0
 def testConfigure(self):
     from zope.configuration import xmlconfig
     import zope.ptresource
     xmlconfig.file('configure.zcml', zope.ptresource)
Ejemplo n.º 32
0
 def setUpZope(self, app, configurationContext):
     import ftw.upgrade.tests.upgrades
     xmlconfig.file('foo.zcml',
                    ftw.upgrade.tests.upgrades,
                    context=configurationContext)
Ejemplo n.º 33
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import ipnext.viewlet.blog
     xmlconfig.file('configure.zcml',
                    ipnext.viewlet.blog,
                    context=configurationContext)
Ejemplo n.º 34
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import wm.showhidecolumns
     xmlconfig.file('configure.zcml',
                    wm.showhidecolumns,
                    context=configurationContext)
    def setUpZope(self, app, configurationContext):

        import collective.z3cform.datagridfield
        xmlconfig.file('configure.zcml',
                       collective.z3cform.datagridfield,
                       context=configurationContext)
Ejemplo n.º 36
0
 def setUpZope(self, app, configurationContext):
     import plone.app.versioningbehavior
     xmlconfig.file('configure.zcml',
                    plone.app.versioningbehavior,
                    context=configurationContext)
Ejemplo n.º 37
0
 def setUpZope(self, app, configurationContext):
     import plone.app.contenttypes
     xmlconfig.file('configure.zcml',
                    plone.app.contenttypes,
                    context=configurationContext)
Ejemplo n.º 38
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML for this package
     import domsense.navigation
     xmlconfig.file('configure.zcml',
                    domsense.navigation,
                    context=configurationContext)
Ejemplo n.º 39
0
 def loadZCMLFile(self, filename, package):
     from zope.configuration import xmlconfig
     xmlconfig.file(filename, package, context=self['configurationContext'])
Ejemplo n.º 40
0
 def setUp(self):
     import plone.tiles
     self['configurationContext'] = context = zca.stackConfigurationContext(
         self.get('configurationContext'))
     xmlconfig.file('configure.zcml', plone.tiles, context=context)
Ejemplo n.º 41
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import example.product
     xmlconfig.file('configure.zcml',
                    example.product,
                    context=configurationContext)
Ejemplo n.º 42
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import plone.app.contentmenu
     xmlconfig.file('configure.zcml',
                    plone.app.contentmenu,
                    context=configurationContext)
Ejemplo n.º 43
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import plone.app.discussion
     xmlconfig.file('configure.zcml',
                    plone.app.discussion,
                    context=configurationContext)
Ejemplo n.º 44
0
 def setUp(self):
     super(TestWorkflow, self).setUp()
     import kotti
     xmlconfig.file('workflow.zcml', kotti, execute=True)
Ejemplo n.º 45
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML for this package
     import plonesocial.activitystream
     xmlconfig.file('configure.zcml',
                    plonesocial.activitystream,
                    context=configurationContext)
Ejemplo n.º 46
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML for this package
     import plone.tiles
     import ploneintranet.socialsuite
     import ploneintranet.microblog
     import ploneintranet.activitystream
     import ploneintranet.network
     import ploneintranet.socialtheme
     import ploneintranet.messaging
     import ploneintranet.core
     import ploneintranet.docconv.client
     xmlconfig.file('meta.zcml', plone.tiles, context=configurationContext)
     xmlconfig.file('configure.zcml',
                    ploneintranet.socialsuite,
                    context=configurationContext)
     xmlconfig.file('configure.zcml',
                    ploneintranet.microblog,
                    context=configurationContext)
     xmlconfig.file('configure.zcml',
                    ploneintranet.activitystream,
                    context=configurationContext)
     xmlconfig.file('configure.zcml',
                    ploneintranet.network,
                    context=configurationContext)
     xmlconfig.file('configure.zcml',
                    ploneintranet.socialtheme,
                    context=configurationContext)
     xmlconfig.file('configure.zcml',
                    ploneintranet.messaging,
                    context=configurationContext)
     xmlconfig.file('configure.zcml',
                    ploneintranet.core,
                    context=configurationContext)
     xmlconfig.file('configure.zcml',
                    ploneintranet.docconv.client,
                    context=configurationContext)
Ejemplo n.º 47
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML for this package
     import collective.favorites
     xmlconfig.file('configure.zcml',
                    collective.favorites,
                    context=configurationContext)
Ejemplo n.º 48
0
 def setUpZope(self, app, configurationContext):
     # load ZCML
     import plone.app.toolbar
     xmlconfig.file('configure.zcml',
                    plone.app.toolbar,
                    context=configurationContext)
Ejemplo n.º 49
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import tdf.conferencepolicy
     xmlconfig.file('configure.zcml',
                    tdf.conferencepolicy,
                    context=configurationContext)
Ejemplo n.º 50
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import plone.app.contenttypes
     import emc.policy
     import emc.theme
     import emc.project
     import emc.kb
     import emc.bokeh
     import emc.memberArea
     import emc.auth
     import emc.sync
     import collective.externaleditor
     xmlconfig.file('configure.zcml',
                    plone.app.contenttypes,
                    context=configurationContext)
     xmlconfig.file('configure.zcml',
                    emc.policy,
                    context=configurationContext)
     xmlconfig.file('configure.zcml',
                    emc.theme,
                    context=configurationContext)
     xmlconfig.file('configure.zcml',
                    emc.bokeh,
                    context=configurationContext)
     xmlconfig.file('configure.zcml', emc.kb, context=configurationContext)
     xmlconfig.file('configure.zcml',
                    emc.memberArea,
                    context=configurationContext)
     xmlconfig.file('configure.zcml',
                    emc.project,
                    context=configurationContext)
     xmlconfig.file('configure.zcml',
                    emc.auth,
                    context=configurationContext)
     xmlconfig.file('configure.zcml',
                    emc.sync,
                    context=configurationContext)
     xmlconfig.file('configure.zcml',
                    collective.externaleditor,
                    context=configurationContext)
Ejemplo n.º 51
0
 def setUpZope(self, app, configurationContext):
     import Products.CMFPlone
     xmlconfig.file('configure.zcml',
                    Products.CMFPlone,
                    context=configurationContext)
Ejemplo n.º 52
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML for this package
     import plone.tiles
     import plonesocial.suite
     import plonesocial.microblog
     import plonesocial.activitystream
     import plonesocial.network
     import plonesocial.theme
     import plonesocial.messaging
     import plonesocial.core
     xmlconfig.file('meta.zcml', plone.tiles, context=configurationContext)
     xmlconfig.file('configure.zcml',
                    plonesocial.suite,
                    context=configurationContext)
     xmlconfig.file('configure.zcml',
                    plonesocial.microblog,
                    context=configurationContext)
     xmlconfig.file('configure.zcml',
                    plonesocial.activitystream,
                    context=configurationContext)
     xmlconfig.file('configure.zcml',
                    plonesocial.network,
                    context=configurationContext)
     xmlconfig.file('configure.zcml',
                    plonesocial.theme,
                    context=configurationContext)
     xmlconfig.file('configure.zcml',
                    plonesocial.messaging,
                    context=configurationContext)
     xmlconfig.file('configure.zcml',
                    plonesocial.core,
                    context=configurationContext)
Ejemplo n.º 53
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import tdf.extensiontemplatecentertheme
     xmlconfig.file('configure.zcml',
                    tdf.extensiontemplatecentertheme,
                    context=configurationContext)
Ejemplo n.º 54
0
 def setUpZope(self, app, configurationContext):
     xmlconfig.file('configure.zcml',
                    collective.jqxgrid_pages,
                    context=configurationContext)
Ejemplo n.º 55
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import plone.app.workflowmanager
     xmlconfig.file('configure.zcml',
                    plone.app.workflowmanager,
                    context=configurationContext)
Ejemplo n.º 56
0
 def setUpZope(self, app, configurationContext):
     import collective.celery
     xmlconfig.file('configure.zcml',
                    collective.celery,
                    context=configurationContext)
     z2.installProduct(app, 'collective.celery')
 def setUpZope(self, app, configurationContext):
     import plone.app.dexterity
     xmlconfig.file('configure.zcml',
                    plone.app.dexterity,
                    context=configurationContext)
Ejemplo n.º 58
0
 def setUp(self):
     from zope.configuration import xmlconfig
     super(DirectivesTest, self).setUp()
     self.context = xmlconfig.file('meta.zcml', zope.i18n)
     self.allowed = config.ALLOWED_LANGUAGES
     config.ALLOWED_LANGUAGES = None
Ejemplo n.º 59
0
"""
from zope import component
from zope.configuration import xmlconfig
from bungeni.alchemist import Session
from bungeni.alchemist import security
from bungeni.alchemist.interfaces import IDatabaseEngine
from bungeni import models
from bungeni.models import schema
from bungeni_custom import sys
# load the workflows--adjusts the model with features as per each workflow
from bungeni.core.workflows import adapters

#from marginalia import schema as marginalia_schema
from sqlalchemy import create_engine

context = xmlconfig.file("db.zcml", package=sys)
schema.metadata.bind = db = component.getUtility(IDatabaseEngine, "bungeni-db")

schema.metadata.drop_all()
schema.metadata.create_all()

# load the Alembic configuration and generate the
# version table, "stamping" it with the most recent rev:
from alembic.config import Config
from alembic import command
alembic_cfg = Config("alembic.ini")
command.stamp(alembic_cfg, "head")

#schema.translation_lookup_index.create(db)

security.metadata.bind = db
Ejemplo n.º 60
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import collective.lineage
     xmlconfig.file('configure.zcml',
                    collective.lineage,
                    context=configurationContext)