コード例 #1
0
ファイル: testing.py プロジェクト: fabiosurrage/camara.policy
	def setUpZope(self, app, configurationContext):
		# Load ZCML
		import camara.policy
		xmlconfig.file('configure.zcml',
			camara.policy,
			context=configurationContext
		)
コード例 #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
        )
コード例 #3
0
 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')
コード例 #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'])
コード例 #5
0
 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')
コード例 #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')
コード例 #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)        
コード例 #8
0
ファイル: testing.py プロジェクト: sivanoff/ftw.footer
    def setUpZope(self, app, configurationContext):
        # Load ZCML
        import ftw.footer

        xmlconfig.file('configure.zcml', ftw.footer,
                       context=configurationContext)
        z2.installProduct(app, 'ftw.footer')
コード例 #9
0
 def setUpZope(self, app, configurationContext):
     import plone.app.robotframework.tests
     xmlconfig.file(
         '_profiles.zcml',
         plone.app.robotframework.tests,
         context=configurationContext
     )
コード例 #10
0
ファイル: base.py プロジェクト: collective/plone.jsonapi.core
    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')
コード例 #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')
コード例 #12
0
ファイル: testing.py プロジェクト: mamico/plone.protect
 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)
コード例 #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)
コード例 #14
0
    def setUpZope(self, app, configurationContext):
        # Load ZCML

        import ftw.contenttemplates
        xmlconfig.file('configure.zcml',
                       ftw.contenttemplates,
                       context=configurationContext)
コード例 #15
0
ファイル: test_directives.py プロジェクト: CGTIC/Plone_SP
 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__)
コード例 #16
0
ファイル: tests.py プロジェクト: Martronic-SA/plone.z3cform
 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)
コード例 #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')
コード例 #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)
コード例 #19
0
ファイル: testing.py プロジェクト: mamico/rer.sitesearch
 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')
コード例 #20
0
    def setUpZope(self, app, configurationContext):
        # Load ZCML
        import ftw.portlet.clock

        xmlconfig.file(
            'configure.zcml', ftw.portlet.clock,
                context=configurationContext)
コード例 #21
0
ファイル: testing.py プロジェクト: birdwell/plone.app.content
 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')
コード例 #22
0
ファイル: testing.py プロジェクト: CGTIC/Plone_SP
 def setUpZope(self, app, configurationContext):
     import Products.CMFPlone
     xmlconfig.file(
         'configure.zcml',
         Products.CMFPlone,
         context=configurationContext
     )
コード例 #23
0
    def setUpZope(self, app, configurationContext):

        # Load ZCML
        import eastofeaton.logopanel
        xmlconfig.file('configure.zcml',
                       eastofeaton.logopanel,
                       context=configurationContext)
コード例 #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')
コード例 #25
0
ファイル: testing.py プロジェクト: do3cc/plone.rest
 def setUpZope(self, app, configurationContext):
     import plone.rest
     xmlconfig.file(
         'configure.zcml',
         plone.rest,
         context=configurationContext
     )
コード例 #26
0
ファイル: test_adapters.py プロジェクト: plone/plone.event
    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)
コード例 #27
0
ファイル: resources.py プロジェクト: glenfant/aws.authrss
 def setUpZope(self, app, configurationContext):
     # Load ZCML for this package
     import aws.authrss
     xmlconfig.file('configure.zcml',
                    aws.authrss,
                    context=configurationContext)
     return
コード例 #28
0
    def setUpZope(self, app, configurationContext):

        # Load ZCML
        import eastofeaton.pay2plone
        xmlconfig.file('configure.zcml',
                       eastofeaton.pay2plone,
                       context=configurationContext)
コード例 #29
0
ファイル: testing.py プロジェクト: seantis/ftw.book
    def testSetUp(self):
        import ftw.book.tests
        self['configurationContext'] = zca.stackConfigurationContext(
            self.get('configurationContext'))

        xmlconfig.file('latex.zcml', ftw.book.tests,
                       context=self['configurationContext'])
コード例 #30
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import redomino.tokenrole
     xmlconfig.file('configure.zcml',
                    redomino.tokenrole,
                    context=configurationContext
                   )
コード例 #31
0
ファイル: tests.py プロジェクト: cjwood032/Zope_Walkthrough
 def testConfigure(self):
     from zope.configuration import xmlconfig
     import zope.ptresource
     xmlconfig.file('configure.zcml', zope.ptresource)
コード例 #32
0
 def setUpZope(self, app, configurationContext):
     import ftw.upgrade.tests.upgrades
     xmlconfig.file('foo.zcml',
                    ftw.upgrade.tests.upgrades,
                    context=configurationContext)
コード例 #33
0
ファイル: testing.py プロジェクト: zedr/ipnext.viewlet.blog
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import ipnext.viewlet.blog
     xmlconfig.file('configure.zcml',
                    ipnext.viewlet.blog,
                    context=configurationContext)
コード例 #34
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import wm.showhidecolumns
     xmlconfig.file('configure.zcml',
                    wm.showhidecolumns,
                    context=configurationContext)
コード例 #35
0
    def setUpZope(self, app, configurationContext):

        import collective.z3cform.datagridfield
        xmlconfig.file('configure.zcml',
                       collective.z3cform.datagridfield,
                       context=configurationContext)
コード例 #36
0
 def setUpZope(self, app, configurationContext):
     import plone.app.versioningbehavior
     xmlconfig.file('configure.zcml',
                    plone.app.versioningbehavior,
                    context=configurationContext)
コード例 #37
0
 def setUpZope(self, app, configurationContext):
     import plone.app.contenttypes
     xmlconfig.file('configure.zcml',
                    plone.app.contenttypes,
                    context=configurationContext)
コード例 #38
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML for this package
     import domsense.navigation
     xmlconfig.file('configure.zcml',
                    domsense.navigation,
                    context=configurationContext)
コード例 #39
0
ファイル: zca.py プロジェクト: vipod/plone.testing
 def loadZCMLFile(self, filename, package):
     from zope.configuration import xmlconfig
     xmlconfig.file(filename, package, context=self['configurationContext'])
コード例 #40
0
 def setUp(self):
     import plone.tiles
     self['configurationContext'] = context = zca.stackConfigurationContext(
         self.get('configurationContext'))
     xmlconfig.file('configure.zcml', plone.tiles, context=context)
コード例 #41
0
ファイル: testing.py プロジェクト: toutpt/example.product
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import example.product
     xmlconfig.file('configure.zcml',
                    example.product,
                    context=configurationContext)
コード例 #42
0
ファイル: testing.py プロジェクト: nilbacardit26/plone_prova
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import plone.app.contentmenu
     xmlconfig.file('configure.zcml',
                    plone.app.contentmenu,
                    context=configurationContext)
コード例 #43
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import plone.app.discussion
     xmlconfig.file('configure.zcml',
                    plone.app.discussion,
                    context=configurationContext)
コード例 #44
0
ファイル: test_workflow.py プロジェクト: rkintzi/Kotti
 def setUp(self):
     super(TestWorkflow, self).setUp()
     import kotti
     xmlconfig.file('workflow.zcml', kotti, execute=True)
コード例 #45
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML for this package
     import plonesocial.activitystream
     xmlconfig.file('configure.zcml',
                    plonesocial.activitystream,
                    context=configurationContext)
コード例 #46
0
ファイル: testing.py プロジェクト: kombinat/ploneintranet
 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)
コード例 #47
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML for this package
     import collective.favorites
     xmlconfig.file('configure.zcml',
                    collective.favorites,
                    context=configurationContext)
コード例 #48
0
 def setUpZope(self, app, configurationContext):
     # load ZCML
     import plone.app.toolbar
     xmlconfig.file('configure.zcml',
                    plone.app.toolbar,
                    context=configurationContext)
コード例 #49
0
ファイル: testing.py プロジェクト: tdf/tdf.conferencepolicy
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import tdf.conferencepolicy
     xmlconfig.file('configure.zcml',
                    tdf.conferencepolicy,
                    context=configurationContext)
コード例 #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)
コード例 #51
0
ファイル: testing.py プロジェクト: seantis/Products.CMFPlone
 def setUpZope(self, app, configurationContext):
     import Products.CMFPlone
     xmlconfig.file('configure.zcml',
                    Products.CMFPlone,
                    context=configurationContext)
コード例 #52
0
ファイル: testing.py プロジェクト: Covantec/plonesocial.suite
 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)
コード例 #53
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import tdf.extensiontemplatecentertheme
     xmlconfig.file('configure.zcml',
                    tdf.extensiontemplatecentertheme,
                    context=configurationContext)
コード例 #54
0
 def setUpZope(self, app, configurationContext):
     xmlconfig.file('configure.zcml',
                    collective.jqxgrid_pages,
                    context=configurationContext)
コード例 #55
0
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import plone.app.workflowmanager
     xmlconfig.file('configure.zcml',
                    plone.app.workflowmanager,
                    context=configurationContext)
コード例 #56
0
ファイル: testing.py プロジェクト: tsimkins/collective.celery
 def setUpZope(self, app, configurationContext):
     import collective.celery
     xmlconfig.file('configure.zcml',
                    collective.celery,
                    context=configurationContext)
     z2.installProduct(app, 'collective.celery')
コード例 #57
0
 def setUpZope(self, app, configurationContext):
     import plone.app.dexterity
     xmlconfig.file('configure.zcml',
                    plone.app.dexterity,
                    context=configurationContext)
コード例 #58
0
ファイル: test_zcml.py プロジェクト: c0ns0le/zenoss-4
 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
コード例 #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
コード例 #60
0
ファイル: testing.py プロジェクト: lccruz/collective.lineage
 def setUpZope(self, app, configurationContext):
     # Load ZCML
     import collective.lineage
     xmlconfig.file('configure.zcml',
                    collective.lineage,
                    context=configurationContext)