← Back to all posts
Neyts Zupan
Tech
TechNeyts ZupanLoad overrides.zcml in plone.app.testing
Today I was working on a project where we use overrides.zcml to easily override some default Plone behavior. All was working fine (in the browser, that is)...
from plone.app.testing import PLONE_FIXTURE
from plone.app.testing import PloneSandboxLayer
from plone.testing import z2
from zope.configuration import xmlconfig
class MyProductLayer(PloneSandboxLayer):
defaultBases = (PLONE_FIXTURE,)
def setUpZope(self, app, configurationContext):
import my.product
self.loadZCML(package=my.product)
xmlconfig.includeOverrides(configurationContext, 'overrides.zcml', package=my.product)
z2.installProduct(app, 'my.product')Neyts Zupan
Neyts is the Digital Overlord of Niteo, poking his nose into any and all technical things.


