def setUpZope(self, app, configurationContext):
		# Load ZCML
		import camara.policy
		xmlconfig.file('configure.zcml',
			camara.policy,
			context=configurationContext
		)
    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')
    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')
 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')
    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)        
Exemple #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')
 def setUpZope(self, app, configurationContext):
     import plone.app.robotframework.tests
     xmlconfig.file(
         '_profiles.zcml',
         plone.app.robotframework.tests,
         context=configurationContext
     )
Exemple #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')
 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')
Exemple #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)
    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)
    def setUpZope(self, app, configurationContext):
        # Load ZCML

        import ftw.contenttemplates
        xmlconfig.file('configure.zcml',
                       ftw.contenttemplates,
                       context=configurationContext)
Exemple #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__)
Exemple #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)
        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')
    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)
Exemple #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')
    def setUpZope(self, app, configurationContext):
        # Load ZCML
        import ftw.portlet.clock

        xmlconfig.file(
            'configure.zcml', ftw.portlet.clock,
                context=configurationContext)
Exemple #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')
Exemple #22
0
 def setUpZope(self, app, configurationContext):
     import Products.CMFPlone
     xmlconfig.file(
         'configure.zcml',
         Products.CMFPlone,
         context=configurationContext
     )
    def setUpZope(self, app, configurationContext):

        # Load ZCML
        import eastofeaton.logopanel
        xmlconfig.file('configure.zcml',
                       eastofeaton.logopanel,
                       context=configurationContext)
    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')
Exemple #25
0
 def setUpZope(self, app, configurationContext):
     import plone.rest
     xmlconfig.file(
         'configure.zcml',
         plone.rest,
         context=configurationContext
     )
Exemple #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)
Exemple #27
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML for this package
     import aws.authrss
     xmlconfig.file('configure.zcml',
                    aws.authrss,
                    context=configurationContext)
     return
    def setUpZope(self, app, configurationContext):

        # Load ZCML
        import eastofeaton.pay2plone
        xmlconfig.file('configure.zcml',
                       eastofeaton.pay2plone,
                       context=configurationContext)
Exemple #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'])
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import redomino.tokenrole
     xmlconfig.file('configure.zcml',
                    redomino.tokenrole,
                    context=configurationContext
                   )
Exemple #31
0
 def testConfigure(self):
     from zope.configuration import xmlconfig
     import zope.ptresource
     xmlconfig.file('configure.zcml', zope.ptresource)
 def setUpZope(self, app, configurationContext):
     import ftw.upgrade.tests.upgrades
     xmlconfig.file('foo.zcml',
                    ftw.upgrade.tests.upgrades,
                    context=configurationContext)
Exemple #33
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import ipnext.viewlet.blog
     xmlconfig.file('configure.zcml',
                    ipnext.viewlet.blog,
                    context=configurationContext)
Exemple #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)
Exemple #36
0
 def setUpZope(self, app, configurationContext):
     import plone.app.versioningbehavior
     xmlconfig.file('configure.zcml',
                    plone.app.versioningbehavior,
                    context=configurationContext)
Exemple #37
0
 def setUpZope(self, app, configurationContext):
     import plone.app.contenttypes
     xmlconfig.file('configure.zcml',
                    plone.app.contenttypes,
                    context=configurationContext)
Exemple #38
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML for this package
     import domsense.navigation
     xmlconfig.file('configure.zcml',
                    domsense.navigation,
                    context=configurationContext)
Exemple #39
0
 def loadZCMLFile(self, filename, package):
     from zope.configuration import xmlconfig
     xmlconfig.file(filename, package, context=self['configurationContext'])
Exemple #40
0
 def setUp(self):
     import plone.tiles
     self['configurationContext'] = context = zca.stackConfigurationContext(
         self.get('configurationContext'))
     xmlconfig.file('configure.zcml', plone.tiles, context=context)
Exemple #41
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import example.product
     xmlconfig.file('configure.zcml',
                    example.product,
                    context=configurationContext)
Exemple #42
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import plone.app.contentmenu
     xmlconfig.file('configure.zcml',
                    plone.app.contentmenu,
                    context=configurationContext)
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import plone.app.discussion
     xmlconfig.file('configure.zcml',
                    plone.app.discussion,
                    context=configurationContext)
Exemple #44
0
 def setUp(self):
     super(TestWorkflow, self).setUp()
     import kotti
     xmlconfig.file('workflow.zcml', kotti, execute=True)
Exemple #45
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML for this package
     import plonesocial.activitystream
     xmlconfig.file('configure.zcml',
                    plonesocial.activitystream,
                    context=configurationContext)
Exemple #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)
 def setUpZope(self, app, configurationContext):
     # Load ZCML for this package
     import collective.favorites
     xmlconfig.file('configure.zcml',
                    collective.favorites,
                    context=configurationContext)
Exemple #48
0
 def setUpZope(self, app, configurationContext):
     # load ZCML
     import plone.app.toolbar
     xmlconfig.file('configure.zcml',
                    plone.app.toolbar,
                    context=configurationContext)
Exemple #49
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import tdf.conferencepolicy
     xmlconfig.file('configure.zcml',
                    tdf.conferencepolicy,
                    context=configurationContext)
Exemple #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)
Exemple #51
0
 def setUpZope(self, app, configurationContext):
     import Products.CMFPlone
     xmlconfig.file('configure.zcml',
                    Products.CMFPlone,
                    context=configurationContext)
Exemple #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)
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import tdf.extensiontemplatecentertheme
     xmlconfig.file('configure.zcml',
                    tdf.extensiontemplatecentertheme,
                    context=configurationContext)
Exemple #54
0
 def setUpZope(self, app, configurationContext):
     xmlconfig.file('configure.zcml',
                    collective.jqxgrid_pages,
                    context=configurationContext)
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import plone.app.workflowmanager
     xmlconfig.file('configure.zcml',
                    plone.app.workflowmanager,
                    context=configurationContext)
Exemple #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)
Exemple #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
Exemple #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
Exemple #60
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import collective.lineage
     xmlconfig.file('configure.zcml',
                    collective.lineage,
                    context=configurationContext)