Author: jvloothuis
Date: Sun Dec 30 11:54:02 2007
New Revision: 50188
Modified:
kukit/kss.zope/trunk/kss/zope/tests/base.py
Log:
Fixed the layer by subclassing the ZopeLite layer (which sets up the Zope 2 env)
Modified: kukit/kss.zope/trunk/kss/zope/tests/base.py
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/tests/base.py (original)
+++ kukit/kss.zope/trunk/kss/zope/tests/base.py Sun Dec 30 11:54:02 2007
@@ -20,6 +20,7 @@
import warnings
from Testing.ZopeTestCase import ZopeTestCase, FunctionalTestCase
+from Testing.ZopeTestCase.layer import ZopeLite
from zope import interface
from interfaces import IDebugRequest
@@ -28,7 +29,7 @@
import kss.zope
from kss.zope import KSSView
-class KSSCoreLayer:
+class KSSCoreLayer(ZopeLite):
@classmethod
def setUp(cls):
try:
@@ -36,41 +37,10 @@
except ImportError:
# probably zope 3
pass
- # XXX TODO fix this?? --- never run yet on Z3
- ##from zope.configuration.xmlconfig import XMLConfig
- ##XMLConfig('tests/configure-unittest.zcml', kss.core)()
else:
- ##from Products.Five.zcml import load_string, load_config
from Products.Five.zcml import load_config
load_config('meta.zcml', package=Products.Five)
-
- #try:
load_config('traversing.zcml', package=Products.Five)
- #except IOError:
- # Let's try the Zope 2.9 way (zope.app.traversing is
- # moved in 2.10)
- # load_string(dedent('''\
- # <configure xmlns="http://namespaces.zope.org/zope"
- # xmlns:five="http://namespaces.zope.org/five">
- # <include package="zope.app.traversing" />
- # <adapter
- # for="*"
- # factory="Products.Five.traversable.FiveTraversable"
- # provides="zope.app.traversing.interfaces.ITraversable"
- # />
- # <adapter
- # for="*"
- # factory="zope.app.traversing.adapters.Traverser"
- # provides="zope.app.traversing.interfaces.ITraverser"
- # />
- # </configure>'''))
- # Load the permissions config, if it's there
- #try:
- # load_config('permissions.zcml', package=Products.Five)
- #except IOError:
- # Zope 2.10 / Five 1.3.6 does not have it
- # pass
- ##load_config('configure-unittest.zcml', package=kss.core.tests)
@classmethod
def tearDown(cls):
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins