[CMF-checkins] CVS: CMF/CMFCore/tests -
test_ActionInformation.py:1.8 test_ActionProviderBase.py:1.13
test_ActionsTool.py:1.15 test_CachingPolicyManager.py:1.12
test_CatalogTool.py:1.7 test_ContentTypeRegistry.py:1.11
test_DirectoryView.py:1.18 test_DiscussionTool.py:1.5
test_DynamicType.py:1.6 test_Expression.py:1.6
test_FSFile.py:1.8 test_FSImage.py:1.10
test_FSMetadata.py:1.6 test_FSPageTemplate.py:1.14
test_FSPythonScript.py:1.8 test_FSSecurity.py:1.7
test_MemberDataTool.py:1.5 test_MembershipTool.py:1.10
test_OpaqueItems.py:1.4 test_PortalContent.py:1.4
test_PortalFolder.py:1.32 test_RegistrationTool.py:1.4
test_SkinsTool.py:1.5 test_TypesTool.py:1.29
test_URLTool.py:1.7 test_UndoTool.py:1.4
test_WorkflowTool.py:1.9 test_utils.py:1.2
Yvo Schubbe
y.2004_ at wcm-solutions.de
Mon Apr 26 08:14:49 EDT 2004
Update of /cvs-repository/CMF/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv5625/CMFCore/tests
Modified Files:
test_ActionInformation.py test_ActionProviderBase.py
test_ActionsTool.py test_CachingPolicyManager.py
test_CatalogTool.py test_ContentTypeRegistry.py
test_DirectoryView.py test_DiscussionTool.py
test_DynamicType.py test_Expression.py test_FSFile.py
test_FSImage.py test_FSMetadata.py test_FSPageTemplate.py
test_FSPythonScript.py test_FSSecurity.py
test_MemberDataTool.py test_MembershipTool.py
test_OpaqueItems.py test_PortalContent.py test_PortalFolder.py
test_RegistrationTool.py test_SkinsTool.py test_TypesTool.py
test_URLTool.py test_UndoTool.py test_WorkflowTool.py
test_utils.py
Log Message:
- removed pre Zope 2.6.4 compatibility code
- some whitespace, import and header cleanup
=== CMF/CMFCore/tests/test_ActionInformation.py 1.7 => 1.8 ===
--- CMF/CMFCore/tests/test_ActionInformation.py:1.7 Fri Jan 2 07:55:58 2004
+++ CMF/CMFCore/tests/test_ActionInformation.py Mon Apr 26 08:14:17 2004
@@ -1,12 +1,7 @@
from unittest import TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
+Zope.startup()
from Products.CMFCore.ActionInformation import ActionInformation
from Products.CMFCore.Expression import createExprContext
=== CMF/CMFCore/tests/test_ActionProviderBase.py 1.12 => 1.13 ===
--- CMF/CMFCore/tests/test_ActionProviderBase.py:1.12 Thu Feb 5 08:30:49 2004
+++ CMF/CMFCore/tests/test_ActionProviderBase.py Mon Apr 26 08:14:17 2004
@@ -1,17 +1,8 @@
from unittest import TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
-try:
- from Interface.Verify import verifyClass
-except ImportError:
- # for Zope versions before 2.6.0
- from Interface import verify_class_implementation as verifyClass
+Zope.startup()
+from Interface.Verify import verifyClass
from Products.CMFCore.tests.base.dummy import DummySite
from Products.CMFCore.tests.base.dummy import DummyTool
=== CMF/CMFCore/tests/test_ActionsTool.py 1.14 => 1.15 ===
--- CMF/CMFCore/tests/test_ActionsTool.py:1.14 Mon Feb 23 07:55:03 2004
+++ CMF/CMFCore/tests/test_ActionsTool.py Mon Apr 26 08:14:17 2004
@@ -1,17 +1,8 @@
from unittest import TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
-try:
- from Interface.Verify import verifyClass
-except ImportError:
- # for Zope versions before 2.6.0
- from Interface import verify_class_implementation as verifyClass
+Zope.startup()
+from Interface.Verify import verifyClass
from Products.CMFCore.ActionInformation import ActionInformation
from Products.CMFCore.ActionsTool import ActionsTool
=== CMF/CMFCore/tests/test_CachingPolicyManager.py 1.11 => 1.12 ===
--- CMF/CMFCore/tests/test_CachingPolicyManager.py:1.11 Fri Jan 2 05:04:36 2004
+++ CMF/CMFCore/tests/test_CachingPolicyManager.py Mon Apr 26 08:14:17 2004
@@ -1,17 +1,8 @@
from unittest import TestCase, TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
-try:
- from Interface.Verify import verifyClass
-except ImportError:
- # for Zope versions before 2.6.0
- from Interface import verify_class_implementation as verifyClass
+Zope.startup()
+from Interface.Verify import verifyClass
from App.Common import rfc1123_date
from DateTime.DateTime import DateTime
=== CMF/CMFCore/tests/test_CatalogTool.py 1.6 => 1.7 ===
--- CMF/CMFCore/tests/test_CatalogTool.py:1.6 Fri Jan 2 07:55:58 2004
+++ CMF/CMFCore/tests/test_CatalogTool.py Mon Apr 26 08:14:17 2004
@@ -1,17 +1,8 @@
from unittest import TestCase, TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
-try:
- from Interface.Verify import verifyClass
-except ImportError:
- # for Zope versions before 2.6.0
- from Interface import verify_class_implementation as verifyClass
+Zope.startup()
+from Interface.Verify import verifyClass
from Products.CMFCore.CatalogTool import CatalogTool
from Products.CMFCore.CatalogTool import IndexableObjectWrapper
@@ -45,16 +36,12 @@
import portal_catalog as ICatalogTool
from Products.CMFCore.interfaces.portal_actions \
import ActionProvider as IActionProvider
+ from Products.ZCatalog.IZCatalog import IZCatalog
verifyClass(ICatalogTool, CatalogTool)
verifyClass(IActionProvider, CatalogTool)
+ verifyClass(IZCatalog, CatalogTool)
- try:
- from Products.ZCatalog.IZCatalog import IZCatalog
- verifyClass(IZCatalog, CatalogTool)
- except ImportError:
- # for Zope versions before 2.6.0
- pass
def test_suite():
=== CMF/CMFCore/tests/test_ContentTypeRegistry.py 1.10 => 1.11 ===
--- CMF/CMFCore/tests/test_ContentTypeRegistry.py:1.10 Fri Jan 2 07:55:58 2004
+++ CMF/CMFCore/tests/test_ContentTypeRegistry.py Mon Apr 26 08:14:17 2004
@@ -1,17 +1,8 @@
from unittest import TestCase, TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
-try:
- from Interface.Verify import verifyClass
-except ImportError:
- # for Zope versions before 2.6.0
- from Interface import verify_class_implementation as verifyClass
+Zope.startup()
+from Interface.Verify import verifyClass
from Products.CMFCore.ContentTypeRegistry import ContentTypeRegistry
from Products.CMFCore.ContentTypeRegistry import ExtensionPredicate
=== CMF/CMFCore/tests/test_DirectoryView.py 1.17 => 1.18 ===
--- CMF/CMFCore/tests/test_DirectoryView.py:1.17 Fri Jan 2 07:55:58 2004
+++ CMF/CMFCore/tests/test_DirectoryView.py Mon Apr 26 08:14:17 2004
@@ -1,12 +1,7 @@
from unittest import TestCase, TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
+Zope.startup()
from os import remove, mkdir, rmdir
from os.path import join
=== CMF/CMFCore/tests/test_DiscussionTool.py 1.4 => 1.5 ===
--- CMF/CMFCore/tests/test_DiscussionTool.py:1.4 Fri Jan 2 07:55:58 2004
+++ CMF/CMFCore/tests/test_DiscussionTool.py Mon Apr 26 08:14:17 2004
@@ -1,17 +1,8 @@
from unittest import TestCase, TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
-try:
- from Interface.Verify import verifyClass
-except ImportError:
- # for Zope versions before 2.6.0
- from Interface import verify_class_implementation as verifyClass
+Zope.startup()
+from Interface.Verify import verifyClass
from Products.CMFCore.DiscussionTool import DiscussionTool
from Products.CMFCore.DiscussionTool import OldDiscussable
=== CMF/CMFCore/tests/test_DynamicType.py 1.5 => 1.6 ===
--- CMF/CMFCore/tests/test_DynamicType.py:1.5 Thu Feb 5 09:33:32 2004
+++ CMF/CMFCore/tests/test_DynamicType.py Mon Apr 26 08:14:17 2004
@@ -1,17 +1,8 @@
from unittest import TestCase, TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
-try:
- from Interface.Verify import verifyClass
-except ImportError:
- # for Zope versions before 2.6.0
- from Interface import verify_class_implementation as verifyClass
+Zope.startup()
+from Interface.Verify import verifyClass
from Acquisition import Implicit
from ZPublisher.BaseRequest import BaseRequest
=== CMF/CMFCore/tests/test_Expression.py 1.5 => 1.6 ===
--- CMF/CMFCore/tests/test_Expression.py:1.5 Tue Dec 23 16:47:24 2003
+++ CMF/CMFCore/tests/test_Expression.py Mon Apr 26 08:14:17 2004
@@ -1,12 +1,7 @@
from unittest import TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
+Zope.startup()
from Products.CMFCore.ActionInformation import ActionInformation
from Products.CMFCore.Expression import createExprContext
=== CMF/CMFCore/tests/test_FSFile.py 1.7 => 1.8 ===
--- CMF/CMFCore/tests/test_FSFile.py:1.7 Tue Mar 30 15:53:53 2004
+++ CMF/CMFCore/tests/test_FSFile.py Mon Apr 26 08:14:17 2004
@@ -1,12 +1,7 @@
import unittest
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
+Zope.startup()
from os.path import join as path_join
@@ -75,9 +70,7 @@
self.assertEqual( len( data ), len( ref ) )
self.assertEqual( data, ref )
# ICK! 'HTTPResponse.getHeader' doesn't case-flatten the key!
- # for Zope versions before 2.6.1: Content-Length has to be stringified
- self.assertEqual( str( self.RESPONSE.getHeader(
- 'Content-Length'.lower() ) )
+ self.assertEqual( self.RESPONSE.getHeader( 'Content-Length'.lower() )
, str(len(ref)) )
self.assertEqual( self.RESPONSE.getHeader( 'Content-Type'.lower() )
, 'application/octet-stream' )
=== CMF/CMFCore/tests/test_FSImage.py 1.9 => 1.10 ===
--- CMF/CMFCore/tests/test_FSImage.py:1.9 Fri Jan 2 07:55:58 2004
+++ CMF/CMFCore/tests/test_FSImage.py Mon Apr 26 08:14:17 2004
@@ -1,12 +1,7 @@
import unittest
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
+Zope.startup()
from os.path import join as path_join
@@ -69,9 +64,7 @@
self.assertEqual( len( data ), len( ref ) )
self.assertEqual( data, ref )
# ICK! 'HTTPResponse.getHeader' doesn't case-flatten the key!
- # for Zope versions before 2.6.1: Content-Length has to be stringified
- self.assertEqual( str( self.RESPONSE.getHeader(
- 'Content-Length'.lower() ) )
+ self.assertEqual( self.RESPONSE.getHeader( 'Content-Length'.lower() )
, str(len(ref)) )
self.assertEqual( self.RESPONSE.getHeader( 'Content-Type'.lower() )
, 'image/gif' )
=== CMF/CMFCore/tests/test_FSMetadata.py 1.5 => 1.6 ===
--- CMF/CMFCore/tests/test_FSMetadata.py:1.5 Mon Jan 12 11:37:57 2004
+++ CMF/CMFCore/tests/test_FSMetadata.py Mon Apr 26 08:14:17 2004
@@ -1,12 +1,7 @@
from unittest import TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
+Zope.startup()
from types import ListType
from os import remove
=== CMF/CMFCore/tests/test_FSPageTemplate.py 1.13 => 1.14 ===
--- CMF/CMFCore/tests/test_FSPageTemplate.py:1.13 Mon Apr 12 14:45:06 2004
+++ CMF/CMFCore/tests/test_FSPageTemplate.py Mon Apr 26 08:14:17 2004
@@ -1,12 +1,7 @@
from unittest import TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
+Zope.startup()
from os.path import join as path_join
=== CMF/CMFCore/tests/test_FSPythonScript.py 1.7 => 1.8 ===
--- CMF/CMFCore/tests/test_FSPythonScript.py:1.7 Fri Jan 2 07:55:58 2004
+++ CMF/CMFCore/tests/test_FSPythonScript.py Mon Apr 26 08:14:17 2004
@@ -1,12 +1,7 @@
from unittest import TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
+Zope.startup()
from os.path import join
from sys import exc_info
=== CMF/CMFCore/tests/test_FSSecurity.py 1.6 => 1.7 ===
--- CMF/CMFCore/tests/test_FSSecurity.py:1.6 Fri Jan 2 07:55:58 2004
+++ CMF/CMFCore/tests/test_FSSecurity.py Mon Apr 26 08:14:17 2004
@@ -1,12 +1,7 @@
from unittest import TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
+Zope.startup()
from os import remove
from os.path import join
=== CMF/CMFCore/tests/test_MemberDataTool.py 1.4 => 1.5 ===
--- CMF/CMFCore/tests/test_MemberDataTool.py:1.4 Sun Dec 7 15:44:07 2003
+++ CMF/CMFCore/tests/test_MemberDataTool.py Mon Apr 26 08:14:17 2004
@@ -1,17 +1,8 @@
from unittest import TestCase, TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
-try:
- from Interface.Verify import verifyClass
-except ImportError:
- # for Zope versions before 2.6.0
- from Interface import verify_class_implementation as verifyClass
+Zope.startup()
+from Interface.Verify import verifyClass
from Products.CMFCore.MemberDataTool import MemberDataTool
from Products.CMFCore.MemberDataTool import MemberData
=== CMF/CMFCore/tests/test_MembershipTool.py 1.9 => 1.10 ===
--- CMF/CMFCore/tests/test_MembershipTool.py:1.9 Fri Jan 2 07:42:32 2004
+++ CMF/CMFCore/tests/test_MembershipTool.py Mon Apr 26 08:14:17 2004
@@ -1,17 +1,8 @@
from unittest import TestCase, TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
-try:
- from Interface.Verify import verifyClass
-except ImportError:
- # for Zope versions before 2.6.0
- from Interface import verify_class_implementation as verifyClass
+Zope.startup()
+from Interface.Verify import verifyClass
from AccessControl.SecurityManagement import newSecurityManager
=== CMF/CMFCore/tests/test_OpaqueItems.py 1.3 => 1.4 ===
--- CMF/CMFCore/tests/test_OpaqueItems.py:1.3 Fri Jan 2 07:55:59 2004
+++ CMF/CMFCore/tests/test_OpaqueItems.py Mon Apr 26 08:14:17 2004
@@ -1,27 +1,16 @@
from unittest import TestCase, TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
-try:
- from Interface.Verify import verifyClass
-except ImportError:
- # for Zope versions before 2.6.0
- from Interface import verify_class_implementation as verifyClass
+Zope.startup()
+from Interface.Verify import verifyClass
from types import StringType
-from Products.CMFCore.TypesTool import TypesTool
+from Products.CMFCore.interfaces.IOpaqueItems import ICallableOpaqueItemWithHooks
from Products.CMFCore.PortalFolder import PortalFolder
-
-from Products.CMFCore.tests.base.testcase import SecurityTest
from Products.CMFCore.tests.base.dummy import DummyContent as OriginalDummyContent
-
-from Products.CMFCore.interfaces.IOpaqueItems import ICallableOpaqueItemWithHooks
+from Products.CMFCore.tests.base.testcase import SecurityTest
+from Products.CMFCore.TypesTool import TypesTool
# -------------------------------------------
@@ -35,10 +24,11 @@
container._setObject(id, DummyContent(id, opaqueItem=opaqueItem, catalog=1))
return getattr(container, id)
+
class DummyContent(OriginalDummyContent):
""" A Dummy piece of PortalContent with additional attributes
"""
-
+
def __init__(self, id='dummy', opaqueItem=None, *args, **kw ):
apply(OriginalDummyContent.__init__, (self, id) + args, kw)
if opaqueItem is None:
@@ -50,22 +40,23 @@
else:
self.opaqueItem = opaqueItem('opaqueItem')
self.opaqueItemsId = 'opaqueItem'
-
+
# Ensure additional attributes get copied
def _getCopy(self, container):
obj = DummyContent(self.id, catalog=self.catalog)
setattr(obj, self.opaqueItemsId, getattr(self, self.opaqueItemsId))
return obj
-
+
def isNotifiedByAfterAdd(self):
return getattr(getattr(self, self.opaqueItemsId), 'addCount', None)
-
+
def isNotifiedByAfterClone(self):
return getattr(getattr(self, self.opaqueItemsId), 'cloneCount', None)
-
+
def isNotifiedByBeforeDelete(self):
return getattr(getattr(self, self.opaqueItemsId), 'deleteCount', None)
-
+
+
class OpaqueBase:
""" Opaque item without manage_after/before hookes
"""
@@ -75,7 +66,7 @@
self.addCounter = self.cloneCounter = self.deleteCounter = 1
class MarkerOnly(OpaqueBase):
- """ Opaque item without manage_after/before hookes but marked
+ """ Opaque item without manage_after/before hookes but marked
as callable
"""
__implements__ = (
@@ -83,21 +74,22 @@
)
class HooksOnly(OpaqueBase):
- """ Opaque item with manage_after/before hookes but not marked
+ """ Opaque item with manage_after/before hookes but not marked
as callable
"""
def manage_afterAdd(self, item, container):
self.addCount = self.addCounter
self.addCounter += 1
-
+
def manage_afterClone(self, item):
self.cloneCount = self.cloneCounter
self.cloneCounter += 1
-
+
def manage_beforeDelete(self, item, container):
self.deleteCount = self.deleteCounter
self.deleteCounter += 1
-
+
+
class HooksAndMarker(HooksOnly, MarkerOnly):
""" Opaque item with manage_after/before hookes and marked
as callable
@@ -113,12 +105,12 @@
def setUp(self):
SecurityTest.setUp(self)
-
+
root = self.root
-
+
# setting up types tool
root._setObject( 'portal_types', TypesTool() )
-
+
# setup portal
try: root._delObject('test')
except AttributeError: pass
@@ -130,23 +122,23 @@
folder = self.folder = test.folder
folder._setObject( 'sub', PortalFolder( 'sub', '' ) )
sub = self.sub = folder.sub
-
+
#----- hacks to allow pasting (see also test_PortalFolder)
# WAAA! force sub to allow paste of Dummy object.
sub.all_meta_types = extra_meta_types()
-
+
# delete items if necessary
try: folder._delObject('dummy')
except AttributeError: pass
try: sub._delObject('dummy')
except AttributeError: pass
-
+
def test_nonCallableItem(self):
# no exception should be raised
folder = self.folder
sub = self.sub
dummy = addDummyContent(folder, 'dummy', None)
-
+
# WAAAA! must get _p_jar set
old, dummy._p_jar = sub._p_jar, self.root._p_jar
try:
@@ -159,11 +151,11 @@
folder = self.folder
sub = self.sub
dummy = addDummyContent(folder, 'dummy', MarkerOnly)
-
+
self.failIf(dummy.isNotifiedByAfterAdd())
self.failIf(dummy.isNotifiedByAfterClone())
self.failIf(dummy.isNotifiedByBeforeDelete())
-
+
# WAAAA! must get _p_jar set
old, dummy._p_jar = sub._p_jar, self.root._p_jar
try:
@@ -171,20 +163,20 @@
sub.manage_pasteObjects(cp)
finally:
dummy._p_jar = old
-
+
self.failIf(dummy.isNotifiedByAfterAdd())
self.failIf(dummy.isNotifiedByAfterClone())
self.failIf(dummy.isNotifiedByBeforeDelete())
-
+
def test_callableItemWithHooksOnly(self):
folder = self.folder
sub = self.sub
dummy = addDummyContent(folder, 'dummy', HooksOnly)
-
+
self.failIf(dummy.isNotifiedByAfterAdd())
self.failIf(dummy.isNotifiedByAfterClone())
self.failIf(dummy.isNotifiedByBeforeDelete())
-
+
# WAAAA! must get _p_jar set
old, dummy._p_jar = sub._p_jar, self.root._p_jar
try:
@@ -192,20 +184,20 @@
sub.manage_pasteObjects(cp)
finally:
dummy._p_jar = old
-
+
self.failIf(dummy.isNotifiedByAfterAdd())
self.failIf(dummy.isNotifiedByAfterClone())
self.failIf(dummy.isNotifiedByBeforeDelete())
-
+
def test_callableItemWithHooksAndMarker(self):
folder = self.folder
sub = self.sub
dummy = addDummyContent(folder, 'dummy', HooksAndMarker)
-
+
self.assertEqual(dummy.isNotifiedByAfterAdd(), 1)
self.failIf(dummy.isNotifiedByAfterClone())
self.failIf(dummy.isNotifiedByBeforeDelete())
-
+
# WAAAA! must get _p_jar set
old, dummy._p_jar = sub._p_jar, self.root._p_jar
try:
@@ -213,21 +205,21 @@
sub.manage_pasteObjects(cp)
finally:
dummy._p_jar = old
-
+
self.assertEqual(dummy.isNotifiedByAfterAdd(), 2)
self.assertEqual(dummy.isNotifiedByAfterClone(), 1)
self.failIf(dummy.isNotifiedByBeforeDelete())
-
+
def test_talkbackItem(self):
folder = self.folder
sub = self.sub
-
+
dummy = addDummyContent(folder, 'dummy', 'talkback')
-
+
self.assertEqual(dummy.isNotifiedByAfterAdd(), 1)
self.failIf(dummy.isNotifiedByAfterClone())
self.failIf(dummy.isNotifiedByBeforeDelete())
-
+
# WAAAA! must get _p_jar set
old, dummy._p_jar = sub._p_jar, self.root._p_jar
try:
@@ -235,7 +227,7 @@
sub.manage_pasteObjects(cp)
finally:
dummy._p_jar = old
-
+
self.assertEqual(dummy.isNotifiedByAfterAdd(), 2)
self.assertEqual(dummy.isNotifiedByAfterClone(), 1)
self.failIf(dummy.isNotifiedByBeforeDelete())
=== CMF/CMFCore/tests/test_PortalContent.py 1.3 => 1.4 ===
--- CMF/CMFCore/tests/test_PortalContent.py:1.3 Fri Jan 2 07:55:59 2004
+++ CMF/CMFCore/tests/test_PortalContent.py Mon Apr 26 08:14:17 2004
@@ -1,17 +1,8 @@
from unittest import TestCase, TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
-try:
- from Interface.Verify import verifyClass
-except ImportError:
- # for Zope versions before 2.6.0
- from Interface import verify_class_implementation as verifyClass
+Zope.startup()
+from Interface.Verify import verifyClass
from Products.CMFCore.PortalContent import PortalContent
=== CMF/CMFCore/tests/test_PortalFolder.py 1.31 => 1.32 ===
--- CMF/CMFCore/tests/test_PortalFolder.py:1.31 Tue Apr 13 13:38:59 2004
+++ CMF/CMFCore/tests/test_PortalFolder.py Mon Apr 26 08:14:17 2004
@@ -1,16 +1,13 @@
from unittest import TestCase, TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
+Zope.startup()
from DateTime import DateTime
+from webdav.WriteLockInterface import WriteLockInterface
from Products.CMFCore.CatalogTool import CatalogTool
+from Products.CMFCore.interfaces.Dynamic import DynamicType as IDynamicType
from Products.CMFCore.PortalFolder import ContentFilter
from Products.CMFCore.PortalFolder import PortalFolder
from Products.CMFCore.tests.base.dummy import DummyContent
@@ -22,8 +19,7 @@
from Products.CMFCore.tests.base.utils import has_path
from Products.CMFCore.TypesTool import FactoryTypeInformation as FTI
from Products.CMFCore.TypesTool import TypesTool
-from Products.CMFCore.interfaces.Dynamic import DynamicType as IDynamicType
-from webdav.WriteLockInterface import WriteLockInterface
+
def extra_meta_types():
return [ { 'name' : 'Dummy', 'action' : 'manage_addFolder' } ]
=== CMF/CMFCore/tests/test_RegistrationTool.py 1.3 => 1.4 ===
--- CMF/CMFCore/tests/test_RegistrationTool.py:1.3 Fri Jan 2 07:55:59 2004
+++ CMF/CMFCore/tests/test_RegistrationTool.py Mon Apr 26 08:14:17 2004
@@ -1,17 +1,8 @@
from unittest import TestCase, TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
-try:
- from Interface.Verify import verifyClass
-except ImportError:
- # for Zope versions before 2.6.0
- from Interface import verify_class_implementation as verifyClass
+Zope.startup()
+from Interface.Verify import verifyClass
from Products.CMFCore.RegistrationTool import RegistrationTool
=== CMF/CMFCore/tests/test_SkinsTool.py 1.4 => 1.5 ===
--- CMF/CMFCore/tests/test_SkinsTool.py:1.4 Thu Feb 5 07:52:00 2004
+++ CMF/CMFCore/tests/test_SkinsTool.py Mon Apr 26 08:14:17 2004
@@ -1,17 +1,8 @@
from unittest import TestCase, TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
-try:
- from Interface.Verify import verifyClass
-except ImportError:
- # for Zope versions before 2.6.0
- from Interface import verify_class_implementation as verifyClass
+Zope.startup()
+from Interface.Verify import verifyClass
from Products.CMFCore.SkinsContainer import SkinsContainer
from Products.CMFCore.SkinsTool import SkinsTool
=== CMF/CMFCore/tests/test_TypesTool.py 1.28 => 1.29 ===
--- CMF/CMFCore/tests/test_TypesTool.py:1.28 Fri Jan 2 07:55:59 2004
+++ CMF/CMFCore/tests/test_TypesTool.py Mon Apr 26 08:14:17 2004
@@ -1,17 +1,8 @@
from unittest import TestCase, TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
-try:
- from Interface.Verify import verifyClass
-except ImportError:
- # for Zope versions before 2.6.0
- from Interface import verify_class_implementation as verifyClass
+Zope.startup()
+from Interface.Verify import verifyClass
from types import DictType
=== CMF/CMFCore/tests/test_URLTool.py 1.6 => 1.7 ===
--- CMF/CMFCore/tests/test_URLTool.py:1.6 Fri Jan 2 07:55:59 2004
+++ CMF/CMFCore/tests/test_URLTool.py Mon Apr 26 08:14:17 2004
@@ -1,17 +1,8 @@
from unittest import TestCase, TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
-try:
- from Interface.Verify import verifyClass
-except ImportError:
- # for Zope versions before 2.6.0
- from Interface import verify_class_implementation as verifyClass
+Zope.startup()
+from Interface.Verify import verifyClass
from Products.CMFCore.tests.base.dummy import DummyContent
from Products.CMFCore.tests.base.dummy import DummyFolder
=== CMF/CMFCore/tests/test_UndoTool.py 1.3 => 1.4 ===
--- CMF/CMFCore/tests/test_UndoTool.py:1.3 Fri Jan 2 07:55:59 2004
+++ CMF/CMFCore/tests/test_UndoTool.py Mon Apr 26 08:14:17 2004
@@ -1,17 +1,8 @@
from unittest import TestCase, TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
-try:
- from Interface.Verify import verifyClass
-except ImportError:
- # for Zope versions before 2.6.0
- from Interface import verify_class_implementation as verifyClass
+Zope.startup()
+from Interface.Verify import verifyClass
from Products.CMFCore.UndoTool import UndoTool
=== CMF/CMFCore/tests/test_WorkflowTool.py 1.8 => 1.9 ===
--- CMF/CMFCore/tests/test_WorkflowTool.py:1.8 Mon Mar 8 08:46:09 2004
+++ CMF/CMFCore/tests/test_WorkflowTool.py Mon Apr 26 08:14:17 2004
@@ -1,17 +1,8 @@
from unittest import TestCase, TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
-try:
- from Interface.Verify import verifyClass
-except ImportError:
- # for Zope versions before 2.6.0
- from Interface import verify_class_implementation as verifyClass
+Zope.startup()
+from Interface.Verify import verifyClass
from OFS.SimpleItem import SimpleItem
=== CMF/CMFCore/tests/test_utils.py 1.1 => 1.2 ===
--- CMF/CMFCore/tests/test_utils.py:1.1 Thu Feb 12 03:37:31 2004
+++ CMF/CMFCore/tests/test_utils.py Mon Apr 26 08:14:17 2004
@@ -1,12 +1,7 @@
from unittest import TestSuite, makeSuite, main
-
import Testing
import Zope
-try:
- Zope.startup()
-except AttributeError:
- # for Zope versions before 2.6.1
- pass
+Zope.startup()
from AccessControl import getSecurityManager
from AccessControl.Owned import Owned
More information about the CMF-checkins
mailing list