Author: jvloothuis
Date: Sun Dec 30 18:41:13 2007
New Revision: 50213
Modified:
kukit/kss.zope/trunk/kss/zope/tests/base.py
Log:
Made the import of ZopeLite and its insertion into the test layer conditional
so that it can work without as well (on Zope 3)
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 18:41:13 2007
@@ -20,7 +20,6 @@
import warnings
from Testing.ZopeTestCase import ZopeTestCase, FunctionalTestCase
-from Testing.ZopeTestCase.layer import ZopeLite
from zope import interface
from interfaces import IDebugRequest
@@ -29,7 +28,7 @@
import kss.zope
from kss.zope import KSSView
-class KSSCoreLayer(ZopeLite):
+class KSSCoreLayer:
@classmethod
def setUp(cls):
try:
@@ -87,3 +86,12 @@
class KSSViewFunctionalTestCase(FunctionalTestCase, KSSViewTestCase):
'Functional test base'
+
+try:
+ from Testing.ZopeTestCase.layer import ZopeLite
+except ImportError:
+ # Not on Zope 2
+ pass
+else:
+ # Fix the layers
+ KSSCoreLayer.__bases__ = (ZopeLite, )
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins