[CMF-checkins] CVS: CMF/CMFDefault/tests - test_DefaultWorkflow.py:1.4 test_DiscussionTool.py:1.4 test_Discussions.py:1.18 test_Document.py:1.33 test_DublinCore.py:1.4 test_Favorite.py:1.9 test_Image.py:1.6 test_Link.py:1.11 test_MembershipTool.py:1.12 test_MetadataTool.py:1.8 test_NewsItem.py:1.9 test_Portal.py:1.5 test_PropertiesTool.py:1.4 test_RegistrationTool.py:1.4 test_join.py:1.11 test_utils.py:1.12

Yvo Schubbe y.2004_ at wcm-solutions.de
Mon Apr 26 08:14:50 EDT 2004


Update of /cvs-repository/CMF/CMFDefault/tests
In directory cvs.zope.org:/tmp/cvs-serv5625/CMFDefault/tests

Modified Files:
	test_DefaultWorkflow.py test_DiscussionTool.py 
	test_Discussions.py test_Document.py test_DublinCore.py 
	test_Favorite.py test_Image.py test_Link.py 
	test_MembershipTool.py test_MetadataTool.py test_NewsItem.py 
	test_Portal.py test_PropertiesTool.py test_RegistrationTool.py 
	test_join.py test_utils.py 
Log Message:
- removed pre Zope 2.6.4 compatibility code
- some whitespace, import and header cleanup


=== CMF/CMFDefault/tests/test_DefaultWorkflow.py 1.3 => 1.4 ===
--- CMF/CMFDefault/tests/test_DefaultWorkflow.py:1.3	Sun Dec  7 15:44:08 2003
+++ CMF/CMFDefault/tests/test_DefaultWorkflow.py	Mon Apr 26 08:14:18 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.CMFDefault.DefaultWorkflow import DefaultWorkflowDefinition
 


=== CMF/CMFDefault/tests/test_DiscussionTool.py 1.3 => 1.4 ===
--- CMF/CMFDefault/tests/test_DiscussionTool.py:1.3	Fri Jan  2 07:55:59 2004
+++ CMF/CMFDefault/tests/test_DiscussionTool.py	Mon Apr 26 08:14:18 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.CMFDefault.DiscussionTool import DiscussionTool
 


=== CMF/CMFDefault/tests/test_Discussions.py 1.17 => 1.18 ===
--- CMF/CMFDefault/tests/test_Discussions.py:1.17	Tue Apr 13 13:38:59 2004
+++ CMF/CMFDefault/tests/test_Discussions.py	Mon Apr 26 08:14:18 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.tests.base.dummy import DummyContent


=== CMF/CMFDefault/tests/test_Document.py 1.32 => 1.33 ===
--- CMF/CMFDefault/tests/test_Document.py:1.32	Tue Dec 23 16:47:26 2003
+++ CMF/CMFDefault/tests/test_Document.py	Mon Apr 26 08:14:18 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 os.path import abspath
 from os.path import dirname


=== CMF/CMFDefault/tests/test_DublinCore.py 1.3 => 1.4 ===
--- CMF/CMFDefault/tests/test_DublinCore.py:1.3	Tue Dec 23 16:47:26 2003
+++ CMF/CMFDefault/tests/test_DublinCore.py	Mon Apr 26 08:14:18 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 AccessControl.SecurityManagement import newSecurityManager
 


=== CMF/CMFDefault/tests/test_Favorite.py 1.8 => 1.9 ===
--- CMF/CMFDefault/tests/test_Favorite.py:1.8	Tue Dec 23 16:47:26 2003
+++ CMF/CMFDefault/tests/test_Favorite.py	Mon Apr 26 08:14:18 2004
@@ -16,14 +16,9 @@
 """
 
 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 Products.CMFCore.tests.base.dummy import DummySite
 from Products.CMFCore.tests.base.dummy import DummyTool


=== CMF/CMFDefault/tests/test_Image.py 1.5 => 1.6 ===
--- CMF/CMFDefault/tests/test_Image.py:1.5	Tue Dec 23 16:47:26 2003
+++ CMF/CMFDefault/tests/test_Image.py	Mon Apr 26 08:14:18 2004
@@ -1,14 +1,10 @@
 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()
 
-import os, cStringIO
+from os.path import join as path_join
+from cStringIO import StringIO
 
 from Products.CMFCore.tests.base.dummy import DummySite
 from Products.CMFCore.tests.base.dummy import DummyTool
@@ -16,7 +12,7 @@
 from Products.CMFDefault.Image import Image
 
 TESTS_HOME = tests.__path__[0]
-TEST_JPG = os.path.join(TESTS_HOME, 'TestImage.jpg')
+TEST_JPG = path_join(TESTS_HOME, 'TestImage.jpg')
 
 
 class TestImageElement(TestCase):
@@ -37,7 +33,7 @@
 
         assert image.get_size() == testfilesize
 
-        emptyfile = cStringIO.StringIO()
+        emptyfile = StringIO()
         image.edit(file=emptyfile)
 
         assert image.get_size() > 0


=== CMF/CMFDefault/tests/test_Link.py 1.10 => 1.11 ===
--- CMF/CMFDefault/tests/test_Link.py:1.10	Tue Dec 23 16:47:26 2003
+++ CMF/CMFDefault/tests/test_Link.py	Mon Apr 26 08:14:18 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 re import compile
 


=== CMF/CMFDefault/tests/test_MembershipTool.py 1.11 => 1.12 ===
--- CMF/CMFDefault/tests/test_MembershipTool.py:1.11	Fri Jan  2 07:42:32 2004
+++ CMF/CMFDefault/tests/test_MembershipTool.py	Mon Apr 26 08:14:18 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/CMFDefault/tests/test_MetadataTool.py 1.7 => 1.8 ===
--- CMF/CMFDefault/tests/test_MetadataTool.py:1.7	Fri Jan  2 07:55:59 2004
+++ CMF/CMFDefault/tests/test_MetadataTool.py	Mon Apr 26 08:14:18 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 aq_base
 


=== CMF/CMFDefault/tests/test_NewsItem.py 1.8 => 1.9 ===
--- CMF/CMFDefault/tests/test_NewsItem.py:1.8	Tue Dec 23 16:47:26 2003
+++ CMF/CMFDefault/tests/test_NewsItem.py	Mon Apr 26 08:14:18 2004
@@ -1,17 +1,12 @@
 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.tests.base.content import DOCTYPE
 from Products.CMFCore.tests.base.content import BASIC_HTML
-from Products.CMFCore.tests.base.content import ENTITY_IN_TITLE
 from Products.CMFCore.tests.base.content import BASIC_STRUCTUREDTEXT
+from Products.CMFCore.tests.base.content import DOCTYPE
+from Products.CMFCore.tests.base.content import ENTITY_IN_TITLE
 from Products.CMFCore.tests.base.dummy import DummySite
 from Products.CMFCore.tests.base.dummy import DummyTool
 from Products.CMFCore.tests.base.testcase import RequestTest


=== CMF/CMFDefault/tests/test_Portal.py 1.4 => 1.5 ===
--- CMF/CMFDefault/tests/test_Portal.py:1.4	Fri Jan  2 07:55:59 2004
+++ CMF/CMFDefault/tests/test_Portal.py	Mon Apr 26 08:14:18 2004
@@ -16,14 +16,9 @@
 """
 
 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 Acquisition import aq_base
 


=== CMF/CMFDefault/tests/test_PropertiesTool.py 1.3 => 1.4 ===
--- CMF/CMFDefault/tests/test_PropertiesTool.py:1.3	Fri Jan  2 07:55:59 2004
+++ CMF/CMFDefault/tests/test_PropertiesTool.py	Mon Apr 26 08:14:18 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.CMFDefault.PropertiesTool import PropertiesTool
 


=== CMF/CMFDefault/tests/test_RegistrationTool.py 1.3 => 1.4 ===
--- CMF/CMFDefault/tests/test_RegistrationTool.py:1.3	Fri Jan  2 07:55:59 2004
+++ CMF/CMFDefault/tests/test_RegistrationTool.py	Mon Apr 26 08:14:18 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.CMFDefault.RegistrationTool import RegistrationTool
 


=== CMF/CMFDefault/tests/test_join.py 1.10 => 1.11 ===
--- CMF/CMFDefault/tests/test_join.py:1.10	Fri Jan  2 07:55:59 2004
+++ CMF/CMFDefault/tests/test_join.py	Mon Apr 26 08:14:18 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.tests.base.testcase import TransactionalTest
 


=== CMF/CMFDefault/tests/test_utils.py 1.11 => 1.12 ===
--- CMF/CMFDefault/tests/test_utils.py:1.11	Thu Apr 15 08:52:51 2004
+++ CMF/CMFDefault/tests/test_utils.py	Mon Apr 26 08:14:18 2004
@@ -1,19 +1,13 @@
 from unittest import TestCase, makeSuite, main
-
 import Testing
 import Zope
-try:
-    Zope.startup()
-except AttributeError:
-    # for Zope versions before 2.6.1
-    pass
+Zope.startup()
 
 from Products.CMFCore.tests.base.content import FAUX_HTML_LEADING_TEXT
 from Products.CMFCore.tests.base.content import SIMPLE_HTML
 from Products.CMFCore.tests.base.content import SIMPLE_STRUCTUREDTEXT
 from Products.CMFCore.tests.base.content import SIMPLE_XHTML
 from Products.CMFCore.tests.base.content import STX_WITH_HTML
-
 from Products.CMFDefault.utils import bodyfinder
 from Products.CMFDefault.utils import comma_split
 from Products.CMFDefault.utils import html_headcheck
@@ -56,7 +50,7 @@
         desc_len = len( headers[ 'Description' ].split('\n') )
         assert( desc_len == 2, '%d!' % desc_len )
         assert( len( body ) == 0, '%d!' % len( body ) )
-    
+
     def test_Body( self ):
         headers, body = parseHeadersBody( '%s\n\n%s'
                                         % ( self.COMMON_HEADERS
@@ -65,7 +59,7 @@
                                         )
         assert( len( headers ) == 2, '%d!' % len( headers ) )
         assert( body == self.TEST_BODY )
-    
+
     def test_Preload( self ):
         preloaded = { 'Author' : 'xxx', 'text_format' : 'structured_text' }
         headers, body = parseHeadersBody( '%s\n%s\n\n%s'




More information about the CMF-checkins mailing list