[CMF-checkins] CVS: CMF/CMFCore/tests - test_ActionInformation.py:1.4.2.3 test_ActionProviderBase.py:1.8.14.2 test_ActionsTool.py:1.8.14.3 test_CachingPolicyManager.py:1.9.32.2 test_ContentTypeRegistry.py:1.9.14.2 test_DirectoryView.py:1.14.4.3 test_Expression.py:1.3.40.2 test_FSFile.py:1.4.14.3 test_FSImage.py:1.7.14.2 test_FSMetadata.py:1.3.4.3 test_FSPageTemplate.py:1.9.22.3 test_FSPythonScript.py:1.5.22.2 test_FSSecurity.py:1.5.22.2 test_PortalFolder.py:1.21.4.4 test_TypesTool.py:1.20.4.5 test_WorkflowTool.py:1.5.26.2

Sidnei da Silva sidnei at awkly.org
Fri Apr 23 17:12:06 EDT 2004


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

Modified Files:
      Tag: CMF-1_4-branch
	test_ActionInformation.py test_ActionProviderBase.py 
	test_ActionsTool.py test_CachingPolicyManager.py 
	test_ContentTypeRegistry.py test_DirectoryView.py 
	test_Expression.py test_FSFile.py test_FSImage.py 
	test_FSMetadata.py test_FSPageTemplate.py 
	test_FSPythonScript.py test_FSSecurity.py test_PortalFolder.py 
	test_TypesTool.py test_WorkflowTool.py 
Log Message:
Revert most of my checkin that did remove whitespace and tabs at Tres request. Sorry for the noise.


=== CMF/CMFCore/tests/test_ActionInformation.py 1.4.2.2 => 1.4.2.3 ===
--- CMF/CMFCore/tests/test_ActionInformation.py:1.4.2.2	Thu Apr 22 13:47:48 2004
+++ CMF/CMFCore/tests/test_ActionInformation.py	Fri Apr 23 17:11:35 2004
@@ -17,7 +17,7 @@
 from Products.CMFCore.Expression import Expression, createExprContext
 
 class ActionInformationTests(TransactionalTest):
-
+    
     def setUp( self ):
 
         TransactionalTest.setUp( self )
@@ -58,11 +58,11 @@
         self.assertEqual(ai.getVisibility(), 0)
         self.assertEqual(ai.getCategory(), 'global')
         self.assertEqual(ai.getPermissions(), ())
-
+    
     def test_Condition(self):
-        portal = self.portal
+        portal = self.portal 
         folder = self.folder
-        object = self.object
+        object = self.object 
         ai = ActionInformation(id='view'
                              , title='View'
                              , action=Expression(
@@ -73,7 +73,7 @@
                              , visible=1)
         ec = createExprContext(folder, portal, object)
         self.failIf(ai.testCondition(ec))
-
+        
 def test_suite():
     return TestSuite((
         makeSuite(ActionInformationTests),


=== CMF/CMFCore/tests/test_ActionProviderBase.py 1.8.14.1 => 1.8.14.2 ===
--- CMF/CMFCore/tests/test_ActionProviderBase.py:1.8.14.1	Thu Apr 22 13:47:48 2004
+++ CMF/CMFCore/tests/test_ActionProviderBase.py	Fri Apr 23 17:11:35 2004
@@ -41,7 +41,7 @@
                )
 
 class ActionProviderBaseTests(unittest.TestCase):
-
+    
     def _makeProvider( self, dummy=0 ):
 
         klass = dummy and DummyProvider or ActionProviderBase


=== CMF/CMFCore/tests/test_ActionsTool.py 1.8.14.2 => 1.8.14.3 ===
--- CMF/CMFCore/tests/test_ActionsTool.py:1.8.14.2	Thu Apr 22 13:47:48 2004
+++ CMF/CMFCore/tests/test_ActionsTool.py	Fri Apr 23 17:11:35 2004
@@ -22,9 +22,9 @@
 class ActionsToolTests( SecurityRequestTest ):
 
     def setUp( self ):
-
+        
         SecurityRequestTest.setUp(self)
-
+        
         root = self.root
         root._setObject( 'portal_actions', ActionsTool() )
         root._setObject('foo', URLTool() )
@@ -75,7 +75,7 @@
                                       'category': 'object'}],
                           'folder': [],
                           'global': []})
-
+        
     def test_listDictionaryActions(self):
         """
         Check that listFilteredActionsFor works for objects


=== CMF/CMFCore/tests/test_CachingPolicyManager.py 1.9.32.1 => 1.9.32.2 ===
--- CMF/CMFCore/tests/test_CachingPolicyManager.py:1.9.32.1	Thu Apr 22 13:47:48 2004
+++ CMF/CMFCore/tests/test_CachingPolicyManager.py	Fri Apr 23 17:11:35 2004
@@ -11,13 +11,13 @@
     __allow_access_to_unprotected_subobjects__ = 1
 
     def __init__(self, modified ):
-        self.modified = modified
+        self.modified = modified 
 
     def Type( self ):
         return 'Dummy'
 
     def modified( self ):
-        return self.modified
+        return self.modified 
 
 
 class CachingPolicyTests( unittest.TestCase ):
@@ -36,7 +36,7 @@
         from Products.CMFCore.CachingPolicyManager import createCPContext
         return createCPContext( DummyContent(self._epoch)
                               , 'foo_view', kw, self._epoch )
-
+        
     def test_empty( self ):
 
         policy = self._makePolicy( 'empty' )
@@ -122,7 +122,7 @@
         headers = policy.getHeaders( context )
 
         self.assertEqual( len( headers ), 0 )
-
+        
     def test_mtimeFunc( self ):
 
         policy = self._makePolicy( 'mtimeFunc'
@@ -134,7 +134,7 @@
         self.assertEqual( headers[0][0], 'Last-modified' )
         self.assertEqual( headers[0][1]
                         , rfc1123_date(ACCLARK.timeTime()) )
-
+        
     def test_mtimeFuncNone( self ):
 
         policy = self._makePolicy( 'mtimeFuncNone'
@@ -143,7 +143,7 @@
         headers = policy.getHeaders( context )
 
         self.assertEqual( len( headers ), 0 )
-
+        
     def test_maxAge( self ):
 
         policy = self._makePolicy( 'aged', max_age_secs=86400 )
@@ -159,7 +159,7 @@
                         , rfc1123_date((self._epoch+1).timeTime()) )
         self.assertEqual( headers[2][0].lower() , 'cache-control' )
         self.assertEqual( headers[2][1] , 'max-age=86400' )
-
+        
     def test_noCache( self ):
 
         policy = self._makePolicy( 'noCache', no_cache=1 )
@@ -172,7 +172,7 @@
                         , rfc1123_date(self._epoch.timeTime()) )
         self.assertEqual( headers[1][0].lower() , 'cache-control' )
         self.assertEqual( headers[1][1] , 'no-cache' )
-
+        
     def test_noStore( self ):
 
         policy = self._makePolicy( 'noStore', no_store=1 )
@@ -185,7 +185,7 @@
                         , rfc1123_date(self._epoch.timeTime()) )
         self.assertEqual( headers[1][0].lower() , 'cache-control' )
         self.assertEqual( headers[1][1] , 'no-store' )
-
+        
     def test_mustRevalidate( self ):
 
         policy = self._makePolicy( 'mustRevalidate', must_revalidate=1 )
@@ -198,7 +198,7 @@
                         , rfc1123_date(self._epoch.timeTime()) )
         self.assertEqual( headers[1][0].lower() , 'cache-control' )
         self.assertEqual( headers[1][1] , 'must-revalidate' )
-
+        
     def test_combined( self ):
 
         policy = self._makePolicy( 'noStore', no_cache=1, no_store=1 )
@@ -254,7 +254,7 @@
                          , 'xyzzy', None, None, None, None, None, None )
         self.assertRaises( KeyError, mgr._removePolicy, 'xyzzy' )
         self.assertRaises( KeyError, mgr._reorderPolicy, 'xyzzy', -1 )
-
+    
     def test_addPolicy( self ):
 
         mgr = self._makeOne()


=== CMF/CMFCore/tests/test_ContentTypeRegistry.py 1.9.14.1 => 1.9.14.2 ===
--- CMF/CMFCore/tests/test_ContentTypeRegistry.py:1.9.14.1	Thu Apr 22 13:47:48 2004
+++ CMF/CMFCore/tests/test_ContentTypeRegistry.py	Fri Apr 23 17:11:35 2004
@@ -112,7 +112,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 +151,7 @@
 
         verifyClass(IContentTypeRegistryPredicate, NameRegexPredicate)
 
-
+    
 class ContentTypeRegistryTests( TestCase ):
 
     def setUp( self ):
@@ -164,7 +164,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.14.4.2 => 1.14.4.3 ===
--- CMF/CMFCore/tests/test_DirectoryView.py:1.14.4.2	Thu Apr 22 13:47:48 2004
+++ CMF/CMFCore/tests/test_DirectoryView.py	Fri Apr 23 17:11:35 2004
@@ -23,65 +23,65 @@
     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))
@@ -94,12 +94,12 @@
         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  """
@@ -129,82 +129,82 @@
 
 if DevelopmentMode:
 
-    class DebugModeTests( FSDVTest ):
+  class DebugModeTests( FSDVTest ):
+
+    def setUp( self ):
+        FSDVTest.setUp(self)
+        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)
+
+        # add a method to the fake skin folder
+        self._writeFile(self.test2path, "return 'test2'")
+
+        # edit the test1 method
+        self._writeFile(self.test1path, "return 'new test1'")
+
+        # add a new folder
+        mkdir(self.test3path)
+        
+    def test_AddNewMethod( self ):
+        """
+        See if a method added to the skin folder can be found
+        """
+        self.assertEqual(self.ob.fake_skin.test2(),'test2')
+
+    def test_EditMethod( self ):
+        """
+        See if an edited method exhibits its new behaviour
+        """
+        self.assertEqual(self.ob.fake_skin.test1(),'new test1')
+
+    def test_NewFolder( self ):
+        """
+        See if a new folder shows up
+        """
+        from Products.CMFCore.DirectoryView import DirectoryViewSurrogate
+        self.failUnless(isinstance(self.ob.fake_skin.test3,DirectoryViewSurrogate))
+        self.ob.fake_skin.test3.objectIds()
 
-        def setUp( self ):
-            FSDVTest.setUp(self)
-            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)
-
-            # add a method to the fake skin folder
-            self._writeFile(self.test2path, "return 'test2'")
-
-            # edit the test1 method
-            self._writeFile(self.test1path, "return 'new test1'")
-
-            # add a new folder
-            mkdir(self.test3path)
-
-        def test_AddNewMethod( self ):
-            """
-            See if a method added to the skin folder can be found
-            """
-            self.assertEqual(self.ob.fake_skin.test2(),'test2')
-
-        def test_EditMethod( self ):
-            """
-            See if an edited method exhibits its new behaviour
-            """
-            self.assertEqual(self.ob.fake_skin.test1(),'new test1')
-
-        def test_NewFolder( self ):
-            """
-            See if a new folder shows up
-            """
-            from Products.CMFCore.DirectoryView import DirectoryViewSurrogate
-            self.failUnless(isinstance(self.ob.fake_skin.test3,DirectoryViewSurrogate))
-            self.ob.fake_skin.test3.objectIds()
-
-        def test_DeleteMethod( self ):
-            """
-            Make sure a deleted method goes away
-            """
-            remove(self.test2path)
-            self.failIf(hasattr(self.ob.fake_skin,'test2'))
-
-        def test_DeleteAddEditMethod( self ):
-            """
-            Check that if we delete a method, then add it back,
-            then edit it, the DirectoryView notices.
-
-            This excecises yet another Win32 mtime weirdity.
-            """
-            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
-            """
-            rmdir(self.test3path)
-            self.failIf(hasattr(self.ob.fake_skin,'test3'))
+    def test_DeleteMethod( self ):
+        """
+        Make sure a deleted method goes away
+        """
+        remove(self.test2path)
+        self.failIf(hasattr(self.ob.fake_skin,'test2'))
+
+    def test_DeleteAddEditMethod( self ):
+        """
+        Check that if we delete a method, then add it back,
+        then edit it, the DirectoryView notices.
+
+        This excecises yet another Win32 mtime weirdity.
+        """
+        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
+        """
+        rmdir(self.test3path)
+        self.failIf(hasattr(self.ob.fake_skin,'test3'))
 
 else:
 
@@ -220,3 +220,7 @@
 
 if __name__ == '__main__':
     main(defaultTest='test_suite')
+
+
+
+


=== CMF/CMFCore/tests/test_Expression.py 1.3.40.1 => 1.3.40.2 ===
--- CMF/CMFCore/tests/test_Expression.py:1.3.40.1	Thu Apr 22 13:47:48 2004
+++ CMF/CMFCore/tests/test_Expression.py	Fri Apr 23 17:11:35 2004
@@ -13,7 +13,7 @@
 class ExpressionTests( SecurityTest ):
 
     def setUp( self ):
-
+        
         SecurityTest.setUp(self)
         root = self.root
         root._setObject('portal', DummyContent('portal', url='url_portal'))
@@ -57,7 +57,7 @@
         self.failUnless(folder)
         self.assertEqual(folder.id, 'foo')
         self.assertEqual(folder.absolute_url(), 'url_foo')
-
+        
 def test_suite():
     return TestSuite((
         makeSuite(ExpressionTests),


=== CMF/CMFCore/tests/test_FSFile.py 1.4.14.2 => 1.4.14.3 ===
--- CMF/CMFCore/tests/test_FSFile.py:1.4.14.2	Thu Apr 22 13:47:48 2004
+++ CMF/CMFCore/tests/test_FSFile.py	Fri Apr 23 17:11:35 2004
@@ -21,7 +21,7 @@
     def _makeOne( self, id, filename ):
 
         from Products.CMFCore.FSFile import FSFile
-
+        
         return FSFile( id, os.path.join( self.skin_path_name, filename ) )
 
     def _extractFile( self ):
@@ -126,3 +126,4 @@
 
 if __name__ == '__main__':
     unittest.main(defaultTest='test_suite')
+


=== CMF/CMFCore/tests/test_FSImage.py 1.7.14.1 => 1.7.14.2 ===
--- CMF/CMFCore/tests/test_FSImage.py:1.7.14.1	Thu Apr 22 13:47:48 2004
+++ CMF/CMFCore/tests/test_FSImage.py	Fri Apr 23 17:11:35 2004
@@ -21,7 +21,7 @@
     def _makeOne( self, id, filename ):
 
         from Products.CMFCore.FSImage import FSImage
-
+        
         return FSImage( id, os.path.join( self.skin_path_name, filename ) )
 
     def _extractFile( self ):
@@ -120,3 +120,4 @@
 
 if __name__ == '__main__':
     unittest.main(defaultTest='test_suite')
+


=== CMF/CMFCore/tests/test_FSMetadata.py 1.3.4.2 => 1.3.4.3 ===
--- CMF/CMFCore/tests/test_FSMetadata.py:1.3.4.2	Thu Apr 22 13:47:48 2004
+++ CMF/CMFCore/tests/test_FSMetadata.py	Fri Apr 23 17:11:35 2004
@@ -12,7 +12,7 @@
 from Globals import DevelopmentMode
 
 from test_FSSecurity import FSSecurityBase
-
+        
 class FSMetadata(FSSecurityBase):
 
     def _checkProxyRoles(self, obj, roles):
@@ -36,9 +36,9 @@
             0,
             ['Manager'])
         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
@@ -51,3 +51,7 @@
 
 if __name__ == '__main__':
     main(defaultTest='test_suite')
+
+
+
+


=== CMF/CMFCore/tests/test_FSPageTemplate.py 1.9.22.2 => 1.9.22.3 ===
--- CMF/CMFCore/tests/test_FSPageTemplate.py:1.9.22.2	Thu Apr 22 13:47:48 2004
+++ CMF/CMFCore/tests/test_FSPageTemplate.py	Fri Apr 23 17:11:35 2004
@@ -23,7 +23,7 @@
     def setUp(self):
         FSPTMaker.setUp(self)
         RequestTest.setUp(self)
-
+    
     def tearDown(self):
         RequestTest.tearDown(self)
         FSPTMaker.tearDown(self)
@@ -33,7 +33,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)
@@ -129,3 +129,4 @@
 
 if __name__ == '__main__':
     unittest.main(defaultTest='test_suite')
+


=== CMF/CMFCore/tests/test_FSPythonScript.py 1.5.22.1 => 1.5.22.2 ===
--- CMF/CMFCore/tests/test_FSPythonScript.py:1.5.22.1	Thu Apr 22 13:47:48 2004
+++ CMF/CMFCore/tests/test_FSPythonScript.py	Fri Apr 23 17:11:35 2004
@@ -43,3 +43,4 @@
 
 if __name__ == '__main__':
     main(defaultTest='test_suite')
+


=== CMF/CMFCore/tests/test_FSSecurity.py 1.5.22.1 => 1.5.22.2 ===
--- CMF/CMFCore/tests/test_FSSecurity.py:1.5.22.1	Thu Apr 22 13:47:48 2004
+++ CMF/CMFCore/tests/test_FSSecurity.py	Fri Apr 23 17:11:35 2004
@@ -50,7 +50,7 @@
     def tearDown( self ):
         RequestTest.tearDown(self)
         FSDVTest.tearDown(self)
-
+        
 class FSSecurityTests( FSSecurityBase ):
 
     def test_basicPermissions( self ):
@@ -69,7 +69,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 +82,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,12 +108,12 @@
             # 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
@@ -132,7 +132,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'])
@@ -150,8 +150,12 @@
 def test_suite():
     return TestSuite((
         makeSuite(FSSecurityTests),
-        makeSuite(DebugModeTests),
+        makeSuite(DebugModeTests),        
         ))
 
 if __name__ == '__main__':
     main(defaultTest='test_suite')
+
+
+
+


=== CMF/CMFCore/tests/test_PortalFolder.py 1.21.4.3 => 1.21.4.4 ===
--- CMF/CMFCore/tests/test_PortalFolder.py:1.21.4.3	Thu Apr 22 13:47:48 2004
+++ CMF/CMFCore/tests/test_PortalFolder.py	Fri Apr 23 17:11:35 2004
@@ -454,7 +454,7 @@
         lines = desc.split('; ')
         assert len( lines ) == 1
         assert lines[0] == 'Title: foo'
-
+    
     def test_Creator( self ):
         cfilter = ContentFilter( Creator='moe' )
         dummy = self.dummy
@@ -469,7 +469,7 @@
         lines = desc.split('; ')
         self.assertEqual(len( lines ),1)
         self.assertEqual(lines[0],'Creator: moe')
-
+    
     def test_Description( self ):
         cfilter = ContentFilter( Description='funny' )
         dummy = self.dummy
@@ -484,7 +484,7 @@
         lines = desc.split('; ')
         assert len( lines ) == 1
         assert lines[0] == 'Description: funny'
-
+    
     def test_Subject( self ):
         cfilter = ContentFilter( Subject=('foo',) )
         dummy = self.dummy
@@ -517,7 +517,7 @@
         lines = desc.split('; ')
         assert len( lines ) == 1
         assert lines[0] == 'Subject: foo, bar'
-
+    
     def test_created( self ):
         cfilter = ContentFilter( created=DateTime( '2001/01/01' )
                                , created_usage='range:min' )
@@ -535,7 +535,7 @@
         assert lines[0] == 'Created since: 2001/01/01'
 
     def test_created2( self ):
-
+        
         cfilter = ContentFilter( created=DateTime( '2001/01/01' )
                                , created_usage='range:max' )
 
@@ -551,7 +551,7 @@
         lines = desc.split('; ')
         assert len( lines ) == 1
         assert lines[0] == 'Created before: 2001/01/01'
-
+    
     def test_modified( self ):
         cfilter = ContentFilter( modified=DateTime( '2001/01/01' )
                                , modified_usage='range:min' )
@@ -570,7 +570,7 @@
 
     def test_modified2( self ):
         cfilter = ContentFilter( modified=DateTime( '2001/01/01' )
-                               , modified_usage='range:max' )
+                               , modified_usage='range:max' )        
         dummy = self.dummy
         assert not cfilter( dummy )
         dummy.modified_date = DateTime( '2000/12/31' )
@@ -583,7 +583,7 @@
         lines = desc.split('; ')
         assert len( lines ) == 1
         assert lines[0] == 'Modified before: 2001/01/01'
-
+ 
     def test_mixed( self ):
         cfilter = ContentFilter( created=DateTime( '2001/01/01' )
                                , created_usage='range:max'


=== CMF/CMFCore/tests/test_TypesTool.py 1.20.4.4 => 1.20.4.5 ===
--- CMF/CMFCore/tests/test_TypesTool.py:1.20.4.4	Thu Apr 22 13:47:48 2004
+++ CMF/CMFCore/tests/test_TypesTool.py	Fri Apr 23 17:11:35 2004
@@ -55,7 +55,7 @@
         fti = FTIDATA_DUMMY[0].copy()
         del fti['id']
         self.ttool._setObject( 'Dummy Content', apply( FTI, ('Dummy Content',), fti) )
-
+ 
     def test_processActions( self ):
         """
         Are the correct, permitted methods returned for actions?
@@ -128,17 +128,17 @@
                       'Unauthorized raised' )
 
 def test_interface(self):
-    from Products.CMFCore.interfaces.portal_types \
-            import portal_types as ITypesTool
-    from Products.CMFCore.interfaces.portal_actions \
-            import ActionProvider as IActionProvider
+        from Products.CMFCore.interfaces.portal_types \
+                import portal_types as ITypesTool
+        from Products.CMFCore.interfaces.portal_actions \
+                import ActionProvider as IActionProvider
 
-    verifyClass(ITypesTool, TypesTool)
-    verifyClass(IActionProvider, TypesTool)
+        verifyClass(ITypesTool, TypesTool)
+        verifyClass(IActionProvider, TypesTool)
 
 
 class TypeInfoTests(TestCase):
-
+    
     def test_construction( self ):
         ti = self._makeInstance( 'Foo'
                                , description='Description'
@@ -162,9 +162,9 @@
         t = apply( 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' ) )
@@ -175,9 +175,9 @@
         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'
@@ -200,7 +200,7 @@
                                        )
         self.failUnless ( taf2.allowType( 'Hidden' ) )
         self.failUnless ( taf2.allowType( 'Not Hidden') )
-
+        
 
     def test_allowDiscussion( self ):
         ti = self._makeInstance( 'Foo' )
@@ -229,7 +229,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 )
@@ -248,16 +248,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' )
 
@@ -349,7 +349,7 @@
                 import ContentTypeInformation as ITypeInformation
 
         verifyClass(ITypeInformation, FTI)
-
+        
 
 class STIDataTests( TypeInfoTests ):
 
@@ -379,7 +379,7 @@
                 import ContentTypeInformation as ITypeInformation
 
         verifyClass(ITypeInformation, STI)
-
+        
 
 class FTIConstructionTests(TestCase):
 
@@ -437,7 +437,7 @@
                   , factory='addFoo'
                   )
         folder = DummyFolder( fake_product=1,prefix=prefix )
-
+        
         return ti, folder
 
     def test_isConstructionAllowed_for_Omnipotent( self ):


=== CMF/CMFCore/tests/test_WorkflowTool.py 1.5.26.1 => 1.5.26.2 ===
--- CMF/CMFCore/tests/test_WorkflowTool.py:1.5.26.1	Thu Apr 22 13:47:48 2004
+++ CMF/CMFCore/tests/test_WorkflowTool.py	Fri Apr 23 17:11:35 2004
@@ -103,7 +103,7 @@
         if getattr( ob, 'meta_type', None ) is 'Dummy':
             return DummyTypeInfo( 'Dummy Content' )
         return None
-
+        
 
 class WorkflowToolTests( unittest.TestCase ):
 
@@ -315,7 +315,7 @@
             and then check to see that the workflows each got called;
             check the resulting count, as well.
         """
-
+        
 def test_suite():
     return unittest.TestSuite((
         unittest.makeSuite(WorkflowToolTests),




More information about the CMF-checkins mailing list