[CMF-checkins] SVN: CMF/trunk/CMF merged -r68250:68251 from 2.0
branch:
Yvo Schubbe
y.2006_ at wcm-solutions.de
Tue May 23 05:36:14 EDT 2006
Log message for revision 68253:
merged -r68250:68251 from 2.0 branch:
- refactored test setup for traversing (fixes some broken tests on Zope trunk)
Changed:
U CMF/trunk/CMFCore/tests/base/testcase.py
U CMF/trunk/CMFCore/tests/test_ActionInformation.py
U CMF/trunk/CMFCore/tests/test_CachingPolicyManager.py
U CMF/trunk/CMFCore/tests/test_TypesTool.py
U CMF/trunk/CMFDefault/tests/test_DiscussionReply.py
U CMF/trunk/CMFDefault/tests/test_Image.py
U CMF/trunk/CMFDefault/tests/test_Portal.py
-=-
Modified: CMF/trunk/CMFCore/tests/base/testcase.py
===================================================================
--- CMF/trunk/CMFCore/tests/base/testcase.py 2006-05-23 09:31:41 UTC (rev 68252)
+++ CMF/trunk/CMFCore/tests/base/testcase.py 2006-05-23 09:36:11 UTC (rev 68253)
@@ -46,7 +46,17 @@
</configure>
"""
+def setUpTraversing():
+ import Products.Five
+ zcml.load_config('meta.zcml', Products.Five)
+ try:
+ # BBB: for Zope 2.9
+ from Products.Five.traversable import FiveTraversable
+ zcml.load_string(_TRAVERSE_ZCML)
+ except ImportError:
+ zcml.load_config('traversing.zcml', Products.Five)
+
class LogInterceptor:
logged = None
Modified: CMF/trunk/CMFCore/tests/test_ActionInformation.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_ActionInformation.py 2006-05-23 09:31:41 UTC (rev 68252)
+++ CMF/trunk/CMFCore/tests/test_ActionInformation.py 2006-05-23 09:36:11 UTC (rev 68253)
@@ -29,8 +29,8 @@
from Products.CMFCore.tests.base.dummy import DummyContent
from Products.CMFCore.tests.base.dummy import DummySite
from Products.CMFCore.tests.base.dummy import DummyTool as DummyMembershipTool
-from Products.CMFCore.tests.base.testcase import _TRAVERSE_ZCML
from Products.CMFCore.tests.base.testcase import SecurityTest
+from Products.CMFCore.tests.base.testcase import setUpTraversing
from Products.CMFCore.tests.base.testcase import TransactionalTest
@@ -294,10 +294,9 @@
def setUp(self):
import Products.CMFCore
TransactionalTest.setUp(self)
- zcml.load_config('meta.zcml', Products.Five)
+ setUpTraversing()
zcml.load_config('permissions.zcml', Products.Five)
zcml.load_config('configure.zcml', Products.CMFCore)
- zcml.load_string(_TRAVERSE_ZCML)
root = self.root
root._setObject('portal', DummyContent('portal', 'url_portal'))
Modified: CMF/trunk/CMFCore/tests/test_CachingPolicyManager.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_CachingPolicyManager.py 2006-05-23 09:31:41 UTC (rev 68252)
+++ CMF/trunk/CMFCore/tests/test_CachingPolicyManager.py 2006-05-23 09:36:11 UTC (rev 68253)
@@ -33,9 +33,9 @@
from Products.CMFCore.tests.base.dummy import DummySite
from Products.CMFCore.tests.base.dummy import DummyTool
from Products.CMFCore.tests.base.dummy import DummyUserFolder
-from Products.CMFCore.tests.base.testcase import _TRAVERSE_ZCML
from Products.CMFCore.tests.base.testcase import FSDVTest
from Products.CMFCore.tests.base.testcase import RequestTest
+from Products.CMFCore.tests.base.testcase import setUpTraversing
ACCLARK = DateTime( '2001/01/01' )
portal_owner = 'portal_owner'
@@ -609,10 +609,9 @@
RequestTest.setUp(self)
FSDVTest.setUp(self)
- zcml.load_config('meta.zcml', Products.Five)
+ setUpTraversing()
zcml.load_config('permissions.zcml', Products.Five)
zcml.load_config('configure.zcml', Products.CMFCore)
- zcml.load_string(_TRAVERSE_ZCML)
now = DateTime()
Modified: CMF/trunk/CMFCore/tests/test_TypesTool.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_TypesTool.py 2006-05-23 09:31:41 UTC (rev 68252)
+++ CMF/trunk/CMFCore/tests/test_TypesTool.py 2006-05-23 09:36:11 UTC (rev 68253)
@@ -39,8 +39,8 @@
from Products.CMFCore.tests.base.dummy import DummyUserFolder
from Products.CMFCore.tests.base.security import OmnipotentUser
from Products.CMFCore.tests.base.security import UserWithRoles
-from Products.CMFCore.tests.base.testcase import _TRAVERSE_ZCML
from Products.CMFCore.tests.base.testcase import SecurityTest
+from Products.CMFCore.tests.base.testcase import setUpTraversing
from Products.CMFCore.tests.base.testcase import WarningInterceptor
from Products.CMFCore.tests.base.tidata import FTIDATA_ACTIONS
from Products.CMFCore.tests.base.tidata import FTIDATA_CMF15
@@ -59,11 +59,10 @@
from Products.CMFCore.TypesTool import FactoryTypeInformation as FTI
SecurityTest.setUp(self)
- zcml.load_config('meta.zcml', Products.Five)
+ setUpTraversing()
zcml.load_config('permissions.zcml', Products.Five)
zcml.load_config('configure.zcml', Products.Five.browser)
zcml.load_config('configure.zcml', Products.CMFCore)
- zcml.load_string(_TRAVERSE_ZCML)
self.site = DummySite('site').__of__(self.root)
self.acl_users = self.site._setObject( 'acl_users', DummyUserFolder() )
Modified: CMF/trunk/CMFDefault/tests/test_DiscussionReply.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_DiscussionReply.py 2006-05-23 09:31:41 UTC (rev 68252)
+++ CMF/trunk/CMFDefault/tests/test_DiscussionReply.py 2006-05-23 09:36:11 UTC (rev 68253)
@@ -24,20 +24,19 @@
from Products.Five import zcml
from zope.testing.cleanup import cleanUp
-from Products.CMFCore.tests.base.testcase import _TRAVERSE_ZCML
from Products.CMFCore.tests.base.testcase import RequestTest
+from Products.CMFCore.tests.base.testcase import setUpTraversing
class DiscussionReplyTest(RequestTest):
def setUp(self):
RequestTest.setUp(self)
- zcml.load_config('meta.zcml', Products.Five)
+ setUpTraversing()
zcml.load_config('permissions.zcml', Products.Five)
zcml.load_config('configure.zcml', Products.GenericSetup)
zcml.load_config('configure.zcml', Products.CMFCore)
zcml.load_config('configure.zcml', Products.DCWorkflow)
- zcml.load_string(_TRAVERSE_ZCML)
try:
factory = self.root.manage_addProduct['CMFDefault'].addConfiguredSite
factory('cmf', 'CMFDefault:default', snapshot=False)
Modified: CMF/trunk/CMFDefault/tests/test_Image.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_Image.py 2006-05-23 09:31:41 UTC (rev 68252)
+++ CMF/trunk/CMFDefault/tests/test_Image.py 2006-05-23 09:36:11 UTC (rev 68253)
@@ -31,9 +31,9 @@
from Products.CMFCore.tests.base.dummy import DummySite
from Products.CMFCore.tests.base.dummy import DummyTool
from Products.CMFCore.tests.base.security import OmnipotentUser
-from Products.CMFCore.tests.base.testcase import _TRAVERSE_ZCML
from Products.CMFCore.tests.base.testcase import ContentEventAwareTests
from Products.CMFCore.tests.base.testcase import SecurityRequestTest
+from Products.CMFCore.tests.base.testcase import setUpTraversing
from Products.CMFDefault import tests
from common import ConformsToContent
@@ -111,12 +111,11 @@
def setUp(self):
SecurityRequestTest.setUp(self)
ContentEventAwareTests.setUp(self)
- zcml.load_config('meta.zcml', Products.Five)
+ setUpTraversing()
zcml.load_config('permissions.zcml', Products.Five)
zcml.load_config('configure.zcml', Products.GenericSetup)
zcml.load_config('configure.zcml', Products.CMFCore)
zcml.load_config('configure.zcml', Products.DCWorkflow)
- zcml.load_string(_TRAVERSE_ZCML)
try:
factory = self.root.manage_addProduct['CMFDefault'].addConfiguredSite
factory('cmf', 'CMFDefault:default', snapshot=False)
Modified: CMF/trunk/CMFDefault/tests/test_Portal.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_Portal.py 2006-05-23 09:31:41 UTC (rev 68252)
+++ CMF/trunk/CMFDefault/tests/test_Portal.py 2006-05-23 09:36:11 UTC (rev 68253)
@@ -23,9 +23,9 @@
from Products.Five import zcml
from zope.testing.cleanup import cleanUp
-from Products.CMFCore.tests.base.testcase import _TRAVERSE_ZCML
from Products.CMFCore.tests.base.testcase import ContentEventAwareTests
from Products.CMFCore.tests.base.testcase import SecurityRequestTest
+from Products.CMFCore.tests.base.testcase import setUpTraversing
class CMFSiteTests(SecurityRequestTest, ContentEventAwareTests):
@@ -50,12 +50,11 @@
def setUp(self):
SecurityRequestTest.setUp(self)
ContentEventAwareTests.setUp(self)
- zcml.load_config('meta.zcml', Products.Five)
+ setUpTraversing()
zcml.load_config('permissions.zcml', Products.Five)
zcml.load_config('configure.zcml', Products.GenericSetup)
zcml.load_config('configure.zcml', Products.CMFCore)
zcml.load_config('configure.zcml', Products.DCWorkflow)
- zcml.load_string(_TRAVERSE_ZCML)
def tearDown(self):
ContentEventAwareTests.tearDown(self)
More information about the CMF-checkins
mailing list