[CMF-checkins] SVN: CMF/branches/2.0/ merged r68393 and part of
r68396 from trunk:
Yvo Schubbe
y.2006_ at wcm-solutions.de
Wed May 31 06:36:51 EDT 2006
Log message for revision 68407:
merged r68393 and part of r68396 from trunk:
- fixed unit tests that failed on Zope 2.10
- updated GenericSetup to the latest revision (includes some bug and test fixes)
Changed:
_U CMF/branches/2.0/
U CMF/branches/2.0/CMFCalendar/tests/test_Calendar.py
U CMF/branches/2.0/CMFCore/tests/test_CachingPolicyManager.py
U CMF/branches/2.0/CMFCore/tests/test_Expression.py
U CMF/branches/2.0/CMFCore/tests/test_FSPageTemplate.py
U CMF/branches/2.0/EXTERNALS.txt
-=-
Property changes on: CMF/branches/2.0
___________________________________________________________________
Name: svn:externals
- #
# Used for maintenance of external resources in this svn bundle. Edit
# this file as appropriate and then run the following command from within
# the checkout directory where this file lives on your local machine:
#
# svn propset svn:externals -F ./EXTERNALS.TXT .
#
GenericSetup svn://svn.zope.org/repos/main/GenericSetup/tags/1.1
+ #
# Used for maintenance of external resources in this svn bundle. Edit
# this file as appropriate and then run the following command from within
# the checkout directory where this file lives on your local machine:
#
# svn propset svn:externals -F ./EXTERNALS.TXT .
#
GenericSetup -r 68406 svn://svn.zope.org/repos/main/GenericSetup/trunk
Modified: CMF/branches/2.0/CMFCalendar/tests/test_Calendar.py
===================================================================
--- CMF/branches/2.0/CMFCalendar/tests/test_Calendar.py 2006-05-31 10:12:09 UTC (rev 68406)
+++ CMF/branches/2.0/CMFCalendar/tests/test_Calendar.py 2006-05-31 10:36:50 UTC (rev 68407)
@@ -22,14 +22,18 @@
import locale
+import Products
+import transaction
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import noSecurityManager
from AccessControl.User import UnrestrictedUser
from DateTime import DateTime
+from Products.Five import zcml
from Products.TemporaryFolder.TemporaryFolder import MountedTemporaryFolder
from Products.Transience.Transience import TransientObjectContainer
from Testing.makerequest import makerequest
-import transaction
+from zope.testing.cleanup import cleanUp
+
from Products.CMFCore import Skinnable
@@ -109,6 +113,13 @@
class CalendarRequestTests(unittest.TestCase):
def setUp(self):
+ zcml.load_config('meta.zcml', Products.Five)
+ zcml.load_config('configure.zcml', Products.Five)
+ zcml.load_config('configure.zcml', Products.GenericSetup)
+ zcml.load_config('configure.zcml', Products.CMFCalendar)
+ zcml.load_config('configure.zcml', Products.CMFCore)
+ zcml.load_config('configure.zcml', Products.CMFDefault)
+ zcml.load_config('configure.zcml', Products.DCWorkflow)
self._oldSkindata = Skinnable.SKINDATA.copy()
transaction.begin()
@@ -138,6 +149,7 @@
transaction.abort()
self.app._p_jar.close()
Skinnable.SKINDATA = self._oldSkindata
+ cleanUp()
def _testURL(self,url,params=None):
Site = self.Site
Modified: CMF/branches/2.0/CMFCore/tests/test_CachingPolicyManager.py
===================================================================
--- CMF/branches/2.0/CMFCore/tests/test_CachingPolicyManager.py 2006-05-31 10:12:09 UTC (rev 68406)
+++ CMF/branches/2.0/CMFCore/tests/test_CachingPolicyManager.py 2006-05-31 10:36:50 UTC (rev 68407)
@@ -57,9 +57,6 @@
class CachingPolicyTests(unittest.TestCase):
- def setUp(self):
- self._epoch = DateTime(0)
-
def _makePolicy( self, policy_id, **kw ):
from Products.CMFCore.CachingPolicyManager import CachingPolicy
@@ -70,6 +67,13 @@
return createCPContext( DummyContent2(self._epoch)
, 'foo_view', kw, self._epoch )
+ def setUp(self):
+ setUpTraversing()
+ self._epoch = DateTime(0)
+
+ def tearDown(self):
+ cleanUp()
+
def test_z3interfaces(self):
from zope.interface.verify import verifyClass
from Products.CMFCore.CachingPolicyManager import CachingPolicy
@@ -396,9 +400,12 @@
return CachingPolicyManager(*args, **kw)
def setUp(self):
-
+ setUpTraversing()
self._epoch = DateTime()
+ def tearDown(self):
+ cleanUp()
+
def assertEqualDelta( self, lhs, rhs, delta ):
self.failUnless( abs( lhs - rhs ) <= delta )
Modified: CMF/branches/2.0/CMFCore/tests/test_Expression.py
===================================================================
--- CMF/branches/2.0/CMFCore/tests/test_Expression.py 2006-05-31 10:12:09 UTC (rev 68406)
+++ CMF/branches/2.0/CMFCore/tests/test_Expression.py 2006-05-31 10:36:50 UTC (rev 68407)
@@ -49,21 +49,34 @@
def test_anonymous_ec(self):
self.portal.portal_membership = DummyMembershipTool()
ec = createExprContext(self.folder, self.portal, self.object)
- member = ec.global_vars['member']
+ if hasattr(ec, 'contexts'):
+ member = ec.contexts['member']
+ else:
+ # BBB: for Zope 2.9
+ member = ec.global_vars['member']
self.failIf(member)
def test_authenticatedUser_ec(self):
self.portal.portal_membership = DummyMembershipTool(anon=0)
ec = createExprContext(self.folder, self.portal, self.object)
- member = ec.global_vars['member']
+ if hasattr(ec, 'contexts'):
+ member = ec.contexts['member']
+ else:
+ # BBB: for Zope 2.9
+ member = ec.global_vars['member']
self.assertEqual(member.getId(), 'dummy')
def test_ec_context(self):
self.portal.portal_membership = DummyMembershipTool()
ec = createExprContext(self.folder, self.portal, self.object)
- object = ec.global_vars['object']
- portal = ec.global_vars['portal']
- folder = ec.global_vars['folder']
+ if hasattr(ec, 'contexts'):
+ contexts = ec.contexts
+ else:
+ # BBB: for Zope 2.9
+ contexts = ec.global_vars
+ object = contexts['object']
+ portal = contexts['portal']
+ folder = contexts['folder']
self.failUnless(object)
self.assertEqual(object.id, 'bar')
self.assertEqual(object.absolute_url(), 'url_bar')
Modified: CMF/branches/2.0/CMFCore/tests/test_FSPageTemplate.py
===================================================================
--- CMF/branches/2.0/CMFCore/tests/test_FSPageTemplate.py 2006-05-31 10:12:09 UTC (rev 68406)
+++ CMF/branches/2.0/CMFCore/tests/test_FSPageTemplate.py 2006-05-31 10:36:50 UTC (rev 68407)
@@ -24,6 +24,7 @@
from OFS.Folder import Folder
from Products.PageTemplates.TALES import Undefined
from Products.StandardCacheManagers import RAMCacheManager
+from zope.testing.cleanup import cleanUp
from Products.CMFCore.FSPageTemplate import FSPageTemplate
from Products.CMFCore.FSMetadata import FSMetadata
@@ -31,6 +32,7 @@
from Products.CMFCore.tests.base.testcase import FSDVTest
from Products.CMFCore.tests.base.testcase import RequestTest
from Products.CMFCore.tests.base.testcase import SecurityTest
+from Products.CMFCore.tests.base.testcase import setUpTraversing
class FSPTMaker(FSDVTest):
@@ -47,10 +49,12 @@
def setUp(self):
FSPTMaker.setUp(self)
RequestTest.setUp(self)
+ setUpTraversing()
def tearDown(self):
RequestTest.tearDown(self)
FSPTMaker.tearDown(self)
+ cleanUp()
def test_Call( self ):
Modified: CMF/branches/2.0/EXTERNALS.txt
===================================================================
--- CMF/branches/2.0/EXTERNALS.txt 2006-05-31 10:12:09 UTC (rev 68406)
+++ CMF/branches/2.0/EXTERNALS.txt 2006-05-31 10:36:50 UTC (rev 68407)
@@ -5,4 +5,4 @@
#
# svn propset svn:externals -F ./EXTERNALS.TXT .
#
-GenericSetup svn://svn.zope.org/repos/main/GenericSetup/tags/1.1
+GenericSetup -r 68406 svn://svn.zope.org/repos/main/GenericSetup/trunk
More information about the CMF-checkins
mailing list