[CMF-checkins] CVS: CMF/CMFCore/tests - test_ActionInformation.py:1.7 test_ActionProviderBase.py:1.10 test_ActionsTool.py:1.11 test_CatalogTool.py:1.6 test_ContentTypeRegistry.py:1.10 test_DirectoryView.py:1.17 test_DiscussionTool.py:1.4 test_DynamicType.py:1.4 test_FSFile.py:1.6 test_FSImage.py:1.9 test_FSMetadata.py:1.4 test_FSPageTemplate.py:1.11 test_FSPythonScript.py:1.7 test_FSSecurity.py:1.6 test_OpaqueItems.py:1.3 test_PortalContent.py:1.3 test_PortalFolder.py:1.26 test_RegistrationTool.py:1.3 test_TypesTool.py:1.28 test_URLTool.py:1.6 test_UndoTool.py:1.3 test_WorkflowTool.py:1.7

Yvo Schubbe schubbe at web.de
Fri Jan 2 07:56:30 EST 2004


Update of /cvs-repository/CMF/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv25181/CMFCore/tests

Modified Files:
	test_ActionInformation.py test_ActionProviderBase.py 
	test_ActionsTool.py test_CatalogTool.py 
	test_ContentTypeRegistry.py test_DirectoryView.py 
	test_DiscussionTool.py test_DynamicType.py test_FSFile.py 
	test_FSImage.py test_FSMetadata.py test_FSPageTemplate.py 
	test_FSPythonScript.py test_FSSecurity.py test_OpaqueItems.py 
	test_PortalContent.py test_PortalFolder.py 
	test_RegistrationTool.py test_TypesTool.py test_URLTool.py 
	test_UndoTool.py test_WorkflowTool.py 
Log Message:
- all CMFCore and CMFDefault tests can now be run by themselves (part of Collector #131)


=== CMF/CMFCore/tests/test_ActionInformation.py 1.6 => 1.7 ===
--- CMF/CMFCore/tests/test_ActionInformation.py:1.6	Thu Nov 27 10:06:50 2003
+++ CMF/CMFCore/tests/test_ActionInformation.py	Fri Jan  2 07:55:58 2004
@@ -1,5 +1,6 @@
 from unittest import TestSuite, makeSuite, main
 
+import Testing
 import Zope
 try:
     Zope.startup()


=== CMF/CMFCore/tests/test_ActionProviderBase.py 1.9 => 1.10 ===
--- CMF/CMFCore/tests/test_ActionProviderBase.py:1.9	Thu Nov 27 10:06:50 2003
+++ CMF/CMFCore/tests/test_ActionProviderBase.py	Fri Jan  2 07:55:58 2004
@@ -1,5 +1,6 @@
 from unittest import TestCase, TestSuite, makeSuite, main
 
+import Testing
 import Zope
 try:
     Zope.startup()
@@ -52,7 +53,7 @@
 
 
 class ActionProviderBaseTests(SecurityRequestTest):
-    
+
     def setUp( self ):
         SecurityRequestTest.setUp(self)
         self.site = DummySite('site').__of__(self.root)


=== CMF/CMFCore/tests/test_ActionsTool.py 1.10 => 1.11 ===
--- CMF/CMFCore/tests/test_ActionsTool.py:1.10	Fri Nov 28 09:19:39 2003
+++ CMF/CMFCore/tests/test_ActionsTool.py	Fri Jan  2 07:55:58 2004
@@ -1,5 +1,6 @@
 from unittest import TestSuite, makeSuite, main
 
+import Testing
 import Zope
 try:
     Zope.startup()
@@ -12,17 +13,15 @@
     # for Zope versions before 2.6.0
     from Interface import verify_class_implementation as verifyClass
 
-from Products.CMFCore.tests.base.testcase import \
-     SecurityRequestTest
-
-from Products.CMFCore.ActionsTool import ActionsTool
-from Products.CMFCore.TypesTool import TypesTool
-from Products.CMFCore.PortalFolder import PortalFolder
 from Products.CMFCore.ActionInformation import ActionInformation
+from Products.CMFCore.ActionsTool import ActionsTool
 from Products.CMFCore.Expression import Expression
-from Products.CMFCore.URLTool import URLTool
-from Products.CMFCore.RegistrationTool import RegistrationTool
 from Products.CMFCore.MembershipTool import MembershipTool
+from Products.CMFCore.PortalFolder import PortalFolder
+from Products.CMFCore.RegistrationTool import RegistrationTool
+from Products.CMFCore.tests.base.testcase import SecurityRequestTest
+from Products.CMFCore.TypesTool import TypesTool
+from Products.CMFCore.URLTool import URLTool
 
 
 class ActionsToolTests( SecurityRequestTest ):


=== CMF/CMFCore/tests/test_CatalogTool.py 1.5 => 1.6 ===
--- CMF/CMFCore/tests/test_CatalogTool.py:1.5	Sun Dec  7 15:27:29 2003
+++ CMF/CMFCore/tests/test_CatalogTool.py	Fri Jan  2 07:55:58 2004
@@ -13,11 +13,9 @@
     # for Zope versions before 2.6.0
     from Interface import verify_class_implementation as verifyClass
 
-from Products.CMFCore.tests.base.dummy import \
-     DummyContent
-
-from Products.CMFCore.CatalogTool import IndexableObjectWrapper
 from Products.CMFCore.CatalogTool import CatalogTool
+from Products.CMFCore.CatalogTool import IndexableObjectWrapper
+from Products.CMFCore.tests.base.dummy import DummyContent
 
 
 class IndexableObjectWrapperTests(TestCase):


=== CMF/CMFCore/tests/test_ContentTypeRegistry.py 1.9 => 1.10 ===
--- CMF/CMFCore/tests/test_ContentTypeRegistry.py:1.9	Mon Jan  6 15:40:58 2003
+++ CMF/CMFCore/tests/test_ContentTypeRegistry.py	Fri Jan  2 07:55:58 2004
@@ -1,17 +1,24 @@
 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
 
 from Products.CMFCore.ContentTypeRegistry import ContentTypeRegistry
-from Products.CMFCore.ContentTypeRegistry import MajorMinorPredicate
 from Products.CMFCore.ContentTypeRegistry import ExtensionPredicate
-from Products.CMFCore.ContentTypeRegistry import NameRegexPredicate
+from Products.CMFCore.ContentTypeRegistry import MajorMinorPredicate
 from Products.CMFCore.ContentTypeRegistry import MimeTypeRegexPredicate
+from Products.CMFCore.ContentTypeRegistry import NameRegexPredicate
+
 
 class MajorMinorPredicateTests( TestCase ):
 
@@ -112,7 +119,7 @@
         assert pred( 'foo', 'text/plain', 'asdfljksadf' )
         assert pred( 'foo', 'text/html', 'asdfljksadf' )
         assert not pred( 'foo', 'image/png', 'asdfljksadf' )
-    
+
     def test_interface(self):
         from Products.CMFCore.interfaces.ContentTypeRegistry \
                 import ContentTypeRegistryPredicate \
@@ -151,7 +158,7 @@
 
         verifyClass(IContentTypeRegistryPredicate, NameRegexPredicate)
 
-    
+
 class ContentTypeRegistryTests( TestCase ):
 
     def setUp( self ):
@@ -164,7 +171,7 @@
         assert reg.findTypeName( 'bar', 'text/plain', 'asdfljksadf' ) is None
         assert not reg.listPredicates()
         self.assertRaises( KeyError, reg.removePredicate, 'xyzzy' )
-    
+
     def test_reorder( self ):
         reg=self.reg
         predIDs = ( 'foo', 'bar', 'baz', 'qux' )


=== CMF/CMFCore/tests/test_DirectoryView.py 1.16 => 1.17 ===
--- CMF/CMFCore/tests/test_DirectoryView.py:1.16	Sun Dec  7 15:44:07 2003
+++ CMF/CMFCore/tests/test_DirectoryView.py	Fri Jan  2 07:55:58 2004
@@ -8,14 +8,15 @@
     # for Zope versions before 2.6.1
     pass
 
-from Products.CMFCore.tests.base.dummy import DummyFolder
-from Products.CMFCore.tests.base.testcase import FSDVTest
-from Products.CMFCore.tests.base.testcase import _prefix
+from os import remove, mkdir, rmdir
+from os.path import join
 
 from Globals import DevelopmentMode
 
-from os import remove, mkdir, rmdir
-from os.path import join
+from Products.CMFCore.tests.base.dummy import DummyFolder
+from Products.CMFCore.tests.base.testcase import _prefix
+from Products.CMFCore.tests.base.testcase import FSDVTest
+
 
 class DirectoryViewPathTests( TestCase ):
     """
@@ -24,65 +25,64 @@
     and only do nothing in the case where an appropriate skin
     can't be found.
     """
-    
+
     def setUp(self):
         from Products.CMFCore.DirectoryView import registerDirectory
         from Products.CMFCore.DirectoryView import addDirectoryViews
         registerDirectory('fake_skins', _prefix)
         self.ob = DummyFolder()
-        addDirectoryViews(self.ob, 'fake_skins', _prefix)        
-        
+        addDirectoryViews(self.ob, 'fake_skins', _prefix)
 
     # These, in effect, test the minimalpath and expandpath functions
     # from CMFCore.utils in combination. See DirectoryView.py for details
-    
+
     def test_getDirectoryInfo1( self ):
         """ windows INSTANCE_HOME  """
-        self.ob.fake_skin.manage_properties(r'Products\CMFCore\tests\fake_skins\fake_skin')        
+        self.ob.fake_skin.manage_properties(r'Products\CMFCore\tests\fake_skins\fake_skin')
         self.failUnless(hasattr(self.ob.fake_skin,'test1'),self.ob.fake_skin.getDirPath())
 
     def test_getDirectoryInfo2( self ):
         """ windows SOFTWARE_HOME  """
-        self.ob.fake_skin.manage_properties(r'C:\Zope\2.5.1\Products\CMFCore\tests\fake_skins\fake_skin')        
+        self.ob.fake_skin.manage_properties(r'C:\Zope\2.5.1\Products\CMFCore\tests\fake_skins\fake_skin')
         self.failUnless(hasattr(self.ob.fake_skin,'test1'),self.ob.fake_skin.getDirPath())
 
     def test_getDirectoryInfo3( self ):
         """ *nix INSTANCE_HOME  """
-        self.ob.fake_skin.manage_properties('Products/CMFCore/tests/fake_skins/fake_skin')        
+        self.ob.fake_skin.manage_properties('Products/CMFCore/tests/fake_skins/fake_skin')
         self.failUnless(hasattr(self.ob.fake_skin,'test1'),self.ob.fake_skin.getDirPath())
 
     def test_getDirectoryInfo4( self ):
         """ *nix SOFTWARE_HOME  """
-        self.ob.fake_skin.manage_properties('/usr/local/zope/2.5.1/Products/CMFCore/tests/fake_skins/fake_skin')        
+        self.ob.fake_skin.manage_properties('/usr/local/zope/2.5.1/Products/CMFCore/tests/fake_skins/fake_skin')
         self.failUnless(hasattr(self.ob.fake_skin,'test1'),self.ob.fake_skin.getDirPath())
 
     # These tests cater for the common name scheme for PRODUCTS_PATH of something_PRODUCTS
     def test_getDirectoryInfo5( self ):
         """ windows PRODUCTS_PATH  """
-        from tempfile import mktemp        
+        from tempfile import mktemp
         self.ob.fake_skin.manage_properties(mktemp()+r'Products\CMFCore\tests\fake_skins\fake_skin')
         self.failUnless(hasattr(self.ob.fake_skin,'test1'),self.ob.fake_skin.getDirPath())
 
     def test_getDirectoryInfo6( self ):
         """ linux PRODUCTS_PATH  """
-        from tempfile import mktemp        
+        from tempfile import mktemp
         self.ob.fake_skin.manage_properties(mktemp()+'Products/CMFCore/tests/fake_skins/fake_skin')
         self.failUnless(hasattr(self.ob.fake_skin,'test1'),self.ob.fake_skin.getDirPath())
 
     # second 'Products' in path
     def test_getDirectoryInfo7( self ):
-        self.ob.fake_skin.manage_properties(r'C:\CoolProducts\Zope\2.5.1\Products\CMFCore\tests\fake_skins\fake_skin')        
+        self.ob.fake_skin.manage_properties(r'C:\CoolProducts\Zope\2.5.1\Products\CMFCore\tests\fake_skins\fake_skin')
         self.failUnless(hasattr(self.ob.fake_skin,'test1'),self.ob.fake_skin.getDirPath())
 
     # Test we do nothing if given a really wacky path
     def test_UnhandleableExpandPath( self ):
-        from tempfile import mktemp        
+        from tempfile import mktemp
         self.ob.fake_skin.manage_properties(mktemp())
         self.assertEqual(self.ob.fake_skin.objectIds(),[])
-        
+
     def test_UnhandleableMinimalPath( self ):
-        from Products.CMFCore.utils import minimalpath,normalize      
-        from tempfile import mktemp        
+        from Products.CMFCore.utils import minimalpath, normalize
+        from tempfile import mktemp
         weirdpath = mktemp()
         # we need to normalize 'cos minimalpath does, btu we're not testing normalize in this unit test.
         self.assertEqual(normalize(weirdpath),minimalpath(weirdpath))
@@ -95,12 +95,13 @@
         from os.path import join
         self.failUnless(_dirreg._directories.has_key(join('CMFCore','tests','fake_skins','fake_skin')),_dirreg._directories.keys())
         self.assertEqual(self.ob.fake_skin.getDirPath(),join('CMFCore','tests','fake_skins','fake_skin'))
-    
+
+
 class DirectoryViewTests( FSDVTest ):
 
     def setUp( self ):
         FSDVTest.setUp(self)
-        self._registerDirectory(self)        
+        self._registerDirectory(self)
 
     def test_addDirectoryViews( self ):
         """ Test addDirectoryViews  """
@@ -137,7 +138,7 @@
         self.test1path = join(self.skin_path_name,'test1.py')
         self.test2path = join(self.skin_path_name,'test2.py')
         self.test3path = join(self.skin_path_name,'test3')
-        
+
         # initialise skins
         self._registerDirectory(self)
 
@@ -149,7 +150,7 @@
 
         # add a new folder
         mkdir(self.test3path)
-        
+
     def test_AddNewMethod( self ):
         """
         See if a method added to the skin folder can be found
@@ -186,20 +187,19 @@
         """
         remove(self.test2path)
         self.failIf(hasattr(self.ob.fake_skin,'test2'))
-            
+
         # add method back to the fake skin folder
         self._writeFile(self.test2path, "return 'test2.2'")
-        
+
         # check
         self.assertEqual(self.ob.fake_skin.test2(),'test2.2')
 
-        
         # edit method
         self._writeFile(self.test2path, "return 'test2.3'")
 
         # check
         self.assertEqual(self.ob.fake_skin.test2(),'test2.3')
-        
+
     def test_DeleteFolder( self ):
         """
         Make sure a deleted folder goes away
@@ -212,6 +212,7 @@
     class DebugModeTests( TestCase ):
         pass
 
+
 def test_suite():
     return TestSuite((
         makeSuite(DirectoryViewPathTests),
@@ -221,7 +222,3 @@
 
 if __name__ == '__main__':
     main(defaultTest='test_suite')
-
-
-
-


=== CMF/CMFCore/tests/test_DiscussionTool.py 1.3 => 1.4 ===
--- CMF/CMFCore/tests/test_DiscussionTool.py:1.3	Fri Nov 14 03:34:56 2003
+++ CMF/CMFCore/tests/test_DiscussionTool.py	Fri Jan  2 07:55:58 2004
@@ -1,5 +1,6 @@
 from unittest import TestCase, TestSuite, makeSuite, main
 
+import Testing
 import Zope
 try:
     Zope.startup()


=== CMF/CMFCore/tests/test_DynamicType.py 1.3 => 1.4 ===
--- CMF/CMFCore/tests/test_DynamicType.py:1.3	Thu Nov  6 07:10:03 2003
+++ CMF/CMFCore/tests/test_DynamicType.py	Fri Jan  2 07:55:58 2004
@@ -1,5 +1,6 @@
 from unittest import TestCase, TestSuite, makeSuite, main
 
+import Testing
 import Zope
 try:
     Zope.startup()
@@ -11,6 +12,7 @@
 except ImportError:
     # for Zope versions before 2.6.0
     from Interface import verify_class_implementation as verifyClass
+
 from Acquisition import Implicit
 from ZPublisher.BaseRequest import BaseRequest
 from ZPublisher.HTTPResponse import HTTPResponse


=== CMF/CMFCore/tests/test_FSFile.py 1.5 => 1.6 ===
--- CMF/CMFCore/tests/test_FSFile.py:1.5	Sun Nov 30 12:17:20 2003
+++ CMF/CMFCore/tests/test_FSFile.py	Fri Jan  2 07:55:58 2004
@@ -28,7 +28,7 @@
     def _makeOne( self, id, filename ):
 
         from Products.CMFCore.FSFile import FSFile
-        
+
         return FSFile( id, path_join(self.skin_path_name, filename) )
 
     def _extractFile( self ):
@@ -78,7 +78,6 @@
         self.assertEqual( self.RESPONSE.getHeader( 'Last-Modified'.lower() )
                         , rfc1123_date( mod_time ) )
 
-
     def test_index_html_with_304( self ):
 
         path, ref = self._extractFile()
@@ -98,7 +97,6 @@
 
         self.assertEqual( data, '' )
         self.assertEqual( self.RESPONSE.getStatus(), 304 )
-
 
     def test_index_html_without_304( self ):
 


=== CMF/CMFCore/tests/test_FSImage.py 1.8 => 1.9 ===
--- CMF/CMFCore/tests/test_FSImage.py:1.8	Sun Nov 30 12:17:20 2003
+++ CMF/CMFCore/tests/test_FSImage.py	Fri Jan  2 07:55:58 2004
@@ -28,7 +28,7 @@
     def _makeOne( self, id, filename ):
 
         from Products.CMFCore.FSImage import FSImage
-        
+
         return FSImage( id, path_join(self.skin_path_name, filename) )
 
     def _extractFile( self ):
@@ -78,7 +78,6 @@
         self.assertEqual( self.RESPONSE.getHeader( 'Last-Modified'.lower() )
                         , rfc1123_date( mod_time ) )
 
-
     def test_index_html_with_304( self ):
 
         path, ref = self._extractFile()
@@ -98,7 +97,6 @@
 
         self.assertEqual( data, '' )
         self.assertEqual( self.RESPONSE.getStatus(), 304 )
-
 
     def test_index_html_without_304( self ):
 


=== CMF/CMFCore/tests/test_FSMetadata.py 1.3 => 1.4 ===
--- CMF/CMFCore/tests/test_FSMetadata.py:1.3	Sun Mar 23 23:59:09 2003
+++ CMF/CMFCore/tests/test_FSMetadata.py	Fri Jan  2 07:55:58 2004
@@ -1,18 +1,26 @@
+from unittest import TestSuite, makeSuite, main
+
+import Testing
 import Zope
+try:
+    Zope.startup()
+except AttributeError:
+    # for Zope versions before 2.6.1
+    pass
 
-from unittest import TestSuite, makeSuite, main
 from types import ListType
 from os import remove
 from os.path import join
 from time import sleep
 
+from Globals import DevelopmentMode
+
 from Products.CMFCore.tests.base.testcase import RequestTest
 from Products.CMFCore.tests.base.testcase import FSDVTest
 
-from Globals import DevelopmentMode
-
 from test_FSSecurity import FSSecurityBase
-        
+
+
 class FSMetadata(FSSecurityBase):
 
     def _checkProxyRoles(self, obj, roles):
@@ -31,14 +39,15 @@
             1,
             ['Manager','Anonymous'])
         self._checkProxyRoles(
-            self.ob.fake_skin.test6, 
+            self.ob.fake_skin.test6,
             ['Manager', 'Anonymous'])
-    
+
     def test_proxy(self):
         """ Test roles """
         ob = self.ob.fake_skin.test_dtml
         self._checkProxyRoles(ob, ['Manager', 'Anonymous'])
 
+
 def test_suite():
     return TestSuite((
         makeSuite(FSMetadata),
@@ -46,7 +55,3 @@
 
 if __name__ == '__main__':
     main(defaultTest='test_suite')
-
-
-
-


=== CMF/CMFCore/tests/test_FSPageTemplate.py 1.10 => 1.11 ===
--- CMF/CMFCore/tests/test_FSPageTemplate.py:1.10	Sun Nov 30 12:17:21 2003
+++ CMF/CMFCore/tests/test_FSPageTemplate.py	Fri Jan  2 07:55:58 2004
@@ -29,7 +29,7 @@
     def setUp(self):
         FSPTMaker.setUp(self)
         RequestTest.setUp(self)
-    
+
     def tearDown(self):
         RequestTest.tearDown(self)
         FSPTMaker.tearDown(self)
@@ -39,7 +39,7 @@
         script = self._makeOne( 'testPT', 'testPT.pt' )
         script = script.__of__(self.root)
         self.assertEqual(script(),'foo\n')
-        
+
     def test_ContentType(self):
         script = self._makeOne( 'testXMLPT', 'testXMLPT.pt' )
         script = script.__of__(self.root)


=== CMF/CMFCore/tests/test_FSPythonScript.py 1.6 => 1.7 ===
--- CMF/CMFCore/tests/test_FSPythonScript.py:1.6	Sun Dec  7 15:44:07 2003
+++ CMF/CMFCore/tests/test_FSPythonScript.py	Fri Jan  2 07:55:58 2004
@@ -8,12 +8,15 @@
     # for Zope versions before 2.6.1
     pass
 
+from os.path import join
+from sys import exc_info
+from thread import start_new_thread
+from time import sleep
+
 from OFS.Folder import Folder
+
 from Products.CMFCore.FSPythonScript import FSPythonScript
 from Products.CMFCore.tests.base.testcase import FSDVTest
-from os.path import join
-import sys, time
-from thread import start_new_thread
 
 
 class FSPythonScriptTests( FSDVTest ):
@@ -36,12 +39,12 @@
                 try:
                     res.append(script())
                 except:
-                    res.append('%s: %s' % sys.exc_info()[:2])
+                    res.append('%s: %s' % exc_info()[:2])
 
             start_new_thread(call_script, ())
             call_script()
             while len(res) < 2:
-                time.sleep(0.05)
+                sleep(0.05)
             self.assertEqual(res, ['test1', 'test1'], res)
 
 


=== CMF/CMFCore/tests/test_FSSecurity.py 1.5 => 1.6 ===
--- CMF/CMFCore/tests/test_FSSecurity.py:1.5	Mon Aug 19 13:29:32 2002
+++ CMF/CMFCore/tests/test_FSSecurity.py	Fri Jan  2 07:55:58 2004
@@ -1,16 +1,24 @@
+from unittest import TestSuite, makeSuite, main
+
+import Testing
 import Zope
+try:
+    Zope.startup()
+except AttributeError:
+    # for Zope versions before 2.6.1
+    pass
 
-from unittest import TestSuite, makeSuite, main
-from types import ListType
 from os import remove
 from os.path import join
 from time import sleep
+from types import ListType
 
 from AccessControl.Permission import Permission
-from Products.CMFCore.tests.base.testcase import RequestTest
+from Globals import DevelopmentMode
+
 from Products.CMFCore.tests.base.testcase import FSDVTest
+from Products.CMFCore.tests.base.testcase import RequestTest
 
-from Globals import DevelopmentMode
 
 class FSSecurityBase( RequestTest, FSDVTest ):
 
@@ -50,7 +58,8 @@
     def tearDown( self ):
         RequestTest.tearDown(self)
         FSDVTest.tearDown(self)
-        
+
+
 class FSSecurityTests( FSSecurityBase ):
 
     def test_basicPermissions( self ):
@@ -69,7 +78,7 @@
         self._writeFile('test5.py.security','Access stoopid contents::')
         # check baseline
         self._checkSettings(self.ob.fake_skin.test5,'View',1,[])
-        
+
     def test_invalidAcquireNames( self ):
         """ Test for an invalid spelling of acquire """
         # baseline
@@ -82,14 +91,14 @@
 if DevelopmentMode:
 
     class DebugModeTests( FSSecurityBase ):
-        
+
         def test_addPRM( self ):
             """ Test adding of a .security """
             # baseline
             self._checkSettings(self.ob.fake_skin.test5,'View',1,[])
             # add
             self._writeFile('test5.py.security','View:acquire:Manager')
-            # test            
+            # test
             self._checkSettings(self.ob.fake_skin.test5,'View',1,['Manager'])
 
         def test_delPRM( self ):
@@ -108,18 +117,17 @@
             # we need to wait a second here or the mtime will actually
             # have the same value as set in the last test.
             # Maybe someone brainier than me can figure out a way to make this
-            # suck less :-(            
+            # suck less :-(
             sleep(1)
-            
+
             # baseline
             self._writeFile('test5.py.security','View::Manager,Anonymous')
-            self._checkSettings(self.ob.fake_skin.test5,'View',0,['Manager','Anonymous'])           
+            self._checkSettings(self.ob.fake_skin.test5,'View',0,['Manager','Anonymous'])
             # edit
             self._writeFile('test5.py.security','View:acquire:Manager')
             # test
             self._checkSettings(self.ob.fake_skin.test5,'View',1,['Manager'])
 
-
         def test_DelAddEditPRM( self ):
             """ Test deleting, then adding, then editing a .security file """
             # baseline
@@ -132,7 +140,7 @@
             # have the same value, no human makes two edits in less
             # than a second ;-)
             sleep(1)
-            
+
             # add back
             self._writeFile('test5.py.security','View::Manager,Anonymous')
             self._checkSettings(self.ob.fake_skin.test5,'View',0,['Manager','Anonymous'])
@@ -147,15 +155,12 @@
     class DebugModeTests( FSSecurityBase ):
         pass
 
+
 def test_suite():
     return TestSuite((
         makeSuite(FSSecurityTests),
-        makeSuite(DebugModeTests),        
+        makeSuite(DebugModeTests),
         ))
 
 if __name__ == '__main__':
     main(defaultTest='test_suite')
-
-
-
-


=== CMF/CMFCore/tests/test_OpaqueItems.py 1.2 => 1.3 ===
--- CMF/CMFCore/tests/test_OpaqueItems.py:1.2	Fri Jan  2 05:03:39 2004
+++ CMF/CMFCore/tests/test_OpaqueItems.py	Fri Jan  2 07:55:59 2004
@@ -1,6 +1,6 @@
 from unittest import TestCase, TestSuite, makeSuite, main
-from types import StringType
 
+import Testing
 import Zope
 try:
     Zope.startup()
@@ -13,6 +13,8 @@
     # for Zope versions before 2.6.0
     from Interface import verify_class_implementation as verifyClass
 
+from types import StringType
+
 from Products.CMFCore.TypesTool import TypesTool
 from Products.CMFCore.PortalFolder import PortalFolder
 
@@ -237,7 +239,8 @@
         self.assertEqual(dummy.isNotifiedByAfterAdd(), 2)
         self.assertEqual(dummy.isNotifiedByAfterClone(), 1)
         self.failIf(dummy.isNotifiedByBeforeDelete())
-        
+
+
 def test_suite():
     return TestSuite((
         makeSuite(ManageBeforeAfterTests),


=== CMF/CMFCore/tests/test_PortalContent.py 1.2 => 1.3 ===
--- CMF/CMFCore/tests/test_PortalContent.py:1.2	Mon Jan  6 16:05:48 2003
+++ CMF/CMFCore/tests/test_PortalContent.py	Fri Jan  2 07:55:59 2004
@@ -1,6 +1,12 @@
 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:


=== CMF/CMFCore/tests/test_PortalFolder.py 1.25 => 1.26 ===
--- CMF/CMFCore/tests/test_PortalFolder.py:1.25	Tue Dec 23 16:47:24 2003
+++ CMF/CMFCore/tests/test_PortalFolder.py	Fri Jan  2 07:55:59 2004
@@ -10,19 +10,18 @@
 
 from DateTime import DateTime
 
+from Products.CMFCore.CatalogTool import CatalogTool
+from Products.CMFCore.PortalFolder import ContentFilter
+from Products.CMFCore.PortalFolder import PortalFolder
 from Products.CMFCore.tests.base.dummy import DummyContent
 from Products.CMFCore.tests.base.dummy import DummyFactory
 from Products.CMFCore.tests.base.dummy import DummyFTI
-from Products.CMFCore.tests.base.testcase import SecurityTest
+from Products.CMFCore.tests.base.security import OmnipotentUser
 from Products.CMFCore.tests.base.testcase import newSecurityManager
+from Products.CMFCore.tests.base.testcase import SecurityTest
 from Products.CMFCore.tests.base.utils import has_path
-from Products.CMFCore.tests.base.security import OmnipotentUser
-
-from Products.CMFCore.TypesTool import TypesTool
 from Products.CMFCore.TypesTool import FactoryTypeInformation as FTI
-from Products.CMFCore.CatalogTool import CatalogTool
-from Products.CMFCore.PortalFolder import PortalFolder
-from Products.CMFCore.PortalFolder import ContentFilter
+from Products.CMFCore.TypesTool import TypesTool
 
 def extra_meta_types():
     return [  { 'name' : 'Dummy', 'action' : 'manage_addFolder' } ]


=== CMF/CMFCore/tests/test_RegistrationTool.py 1.2 => 1.3 ===
--- CMF/CMFCore/tests/test_RegistrationTool.py:1.2	Mon Jan  6 16:05:57 2003
+++ CMF/CMFCore/tests/test_RegistrationTool.py	Fri Jan  2 07:55:59 2004
@@ -1,6 +1,12 @@
 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:


=== CMF/CMFCore/tests/test_TypesTool.py 1.27 => 1.28 ===
--- CMF/CMFCore/tests/test_TypesTool.py:1.27	Mon Dec  1 03:59:02 2003
+++ CMF/CMFCore/tests/test_TypesTool.py	Fri Jan  2 07:55:59 2004
@@ -20,24 +20,20 @@
 from AccessControl.SecurityManagement import noSecurityManager
 from AccessControl.SecurityManager import setSecurityPolicy
 from Acquisition import aq_base
-from webdav.NullResource import NullResource
 from Products.PythonScripts.PythonScript import PythonScript
 from Products.PythonScripts.standard import url_quote
+from webdav.NullResource import NullResource
 
 from Products.CMFCore.ActionInformation import ActionInformation
-from Products.CMFCore.TypesTool import FactoryTypeInformation as FTI
-from Products.CMFCore.TypesTool import ScriptableTypeInformation as STI
-from Products.CMFCore.TypesTool import TypesTool
 from Products.CMFCore.PortalFolder import PortalFolder
-from Products.CMFCore.utils import _getViewFor
-
-from Products.CMFCore.tests.base.security import OmnipotentUser
-from Products.CMFCore.tests.base.security import UserWithRoles
 from Products.CMFCore.tests.base.dummy import DummyFactory
 from Products.CMFCore.tests.base.dummy import DummyFolder
 from Products.CMFCore.tests.base.dummy import DummyObject
 from Products.CMFCore.tests.base.dummy import DummySite
 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 SecurityTest
 from Products.CMFCore.tests.base.tidata import FTIDATA_ACTIONS
 from Products.CMFCore.tests.base.tidata import FTIDATA_CMF13
 from Products.CMFCore.tests.base.tidata import FTIDATA_CMF13_FOLDER
@@ -48,7 +44,10 @@
 from Products.CMFCore.tests.base.tidata import FTIDATA_CMF15
 from Products.CMFCore.tests.base.tidata import FTIDATA_DUMMY
 from Products.CMFCore.tests.base.tidata import STI_SCRIPT
-from Products.CMFCore.tests.base.testcase import SecurityTest
+from Products.CMFCore.TypesTool import FactoryTypeInformation as FTI
+from Products.CMFCore.TypesTool import ScriptableTypeInformation as STI
+from Products.CMFCore.TypesTool import TypesTool
+from Products.CMFCore.utils import _getViewFor
 
 
 class TypesToolTests(SecurityTest):
@@ -60,7 +59,7 @@
         self.ttool = self.site._setObject( 'portal_types', TypesTool() )
         fti = FTIDATA_DUMMY[0].copy()
         self.ttool._setObject( 'Dummy Content', FTI(**fti) )
- 
+
     def test_processActions( self ):
         """
         Are the correct, permitted methods returned for actions?
@@ -143,7 +142,7 @@
 
 
 class TypeInfoTests(TestCase):
-    
+
     def test_construction( self ):
         ti = self._makeInstance( 'Foo'
                                , description='Description'
@@ -167,9 +166,9 @@
         t = self._makeInstance(id, **kw)
         tool._setObject(id,t)
         return tool[id]
-              
+
     def test_allowType( self ):
-        self.tool = TypesTool()        
+        self.tool = TypesTool()
         ti = self._makeAndSetInstance( 'Foo' )
         self.failIf( ti.allowType( 'Foo' ) )
         self.failIf( ti.allowType( 'Bar' ) )
@@ -180,9 +179,8 @@
         ti = self._makeAndSetInstance( 'Foo3', filter_content_types=0 )
         self.failUnless( ti.allowType( 'Foo3' ) )
 
-    
     def test_GlobalHide( self ):
-        self.tool = TypesTool()        
+        self.tool = TypesTool()
         tnf = self._makeAndSetInstance( 'Folder', filter_content_types=0)
         taf = self._makeAndSetInstance( 'Allowing Folder'
                                       , allowed_content_types=( 'Hidden'
@@ -205,7 +203,6 @@
                                        )
         self.failUnless ( taf2.allowType( 'Hidden' ) )
         self.failUnless ( taf2.allowType( 'Not Hidden') )
-        
 
     def test_allowDiscussion( self ):
         ti = self._makeInstance( 'Foo' )
@@ -234,7 +231,7 @@
         self.failUnless( 'Object Properties' in names )
         self.failIf( 'slot' in names )
         self.failUnless( 'Slot' in names )
-        
+
         visible = [ x.getId() for x in actions if x.getVisibility() ]
         self.failUnless( 'view' in visible )
         self.failUnless( 'edit' in visible )
@@ -253,16 +250,16 @@
         self.assertEqual( id( ti.getActionById( 'foo', marker ) )
                         , id( marker ) )
         self.assertRaises( ValueError, ti.getActionById, 'foo' )
-        
+
         action = ti.getActionById( 'view' )
         self.assertEqual( action, '' )
-        
+
         action = ti.getActionById( 'edit' )
         self.assertEqual( action, 'foo_edit' )
-        
+
         action = ti.getActionById( 'objectproperties' )
         self.assertEqual( action, 'foo_properties' )
-        
+
         action = ti.getActionById( 'slot' )
         self.assertEqual( action, 'foo_slot' )
 
@@ -426,7 +423,7 @@
                 import ContentTypeInformation as ITypeInformation
 
         verifyClass(ITypeInformation, FTI)
-        
+
 
 class STIDataTests( TypeInfoTests ):
 
@@ -450,7 +447,7 @@
                 import ContentTypeInformation as ITypeInformation
 
         verifyClass(ITypeInformation, STI)
-        
+
 
 class FTIConstructionTests(TestCase):
 
@@ -508,7 +505,7 @@
                   , factory='addFoo'
                   )
         folder = DummyFolder( fake_product=1,prefix=prefix )
-        
+
         return ti, folder
 
     def test_isConstructionAllowed_for_Omnipotent( self ):


=== CMF/CMFCore/tests/test_URLTool.py 1.5 => 1.6 ===
--- CMF/CMFCore/tests/test_URLTool.py:1.5	Fri Nov 28 09:52:02 2003
+++ CMF/CMFCore/tests/test_URLTool.py	Fri Jan  2 07:55:59 2004
@@ -1,5 +1,6 @@
 from unittest import TestCase, TestSuite, makeSuite, main
 
+import Testing
 import Zope
 try:
     Zope.startup()
@@ -15,7 +16,6 @@
 from Products.CMFCore.tests.base.dummy import DummyContent
 from Products.CMFCore.tests.base.dummy import DummyFolder
 from Products.CMFCore.tests.base.dummy import DummySite
-
 from Products.CMFCore.URLTool import URLTool
 
 


=== CMF/CMFCore/tests/test_UndoTool.py 1.2 => 1.3 ===
--- CMF/CMFCore/tests/test_UndoTool.py:1.2	Mon Jan  6 16:06:16 2003
+++ CMF/CMFCore/tests/test_UndoTool.py	Fri Jan  2 07:55:59 2004
@@ -1,6 +1,12 @@
 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:


=== CMF/CMFCore/tests/test_WorkflowTool.py 1.6 => 1.7 ===
--- CMF/CMFCore/tests/test_WorkflowTool.py:1.6	Fri Nov 14 03:34:56 2003
+++ CMF/CMFCore/tests/test_WorkflowTool.py	Fri Jan  2 07:55:59 2004
@@ -1,5 +1,6 @@
 from unittest import TestCase, TestSuite, makeSuite, main
 
+import Testing
 import Zope
 try:
     Zope.startup()
@@ -25,6 +26,7 @@
     def getId( self ):
         return self._id
 
+
 class DummyWorkflow( Dummy ):
 
     meta_type = 'DummyWorkflow'
@@ -100,13 +102,16 @@
     _isPortalContent = 1
     def _getPortalTypeName(self): return 'Dummy Content'
 
+
 class DummyNotReallyContent( Dummy ):
 
     meta_type = 'Dummy Content'
 
+
 class DummyTypeInfo( Dummy ):
 
     pass
+
 
 class DummyTypesTool( SimpleItem ):
 




More information about the CMF-checkins mailing list