[CMF-checkins] CVS: CMF/CMFCore/tests - test_FSFile.py:1.4 test_FSImage.py:1.7

Yvo Schubbe schubbe@web.de
Fri, 10 Jan 2003 05:24:35 -0500


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

Modified Files:
	test_FSFile.py test_FSImage.py 
Log Message:
made tests work again with older Zope versions

=== CMF/CMFCore/tests/test_FSFile.py 1.3 => 1.4 ===
--- CMF/CMFCore/tests/test_FSFile.py:1.3	Mon Dec 23 15:15:20 2002
+++ CMF/CMFCore/tests/test_FSFile.py	Fri Jan 10 05:24:32 2003
@@ -61,10 +61,10 @@
 
         self.assertEqual( len( data ), len( ref ) )
         self.assertEqual( data, ref )
-        #
-        #   ICK!  'HTTPResponse.getHeader' doesn't case-flatten the key!
-        #
-        self.assertEqual( self.RESPONSE.getHeader( 'Content-Length'.lower() )
+        # 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() ) )
                         , str(len(ref)) )
         self.assertEqual( self.RESPONSE.getHeader( 'Content-Type'.lower() )
                         , 'application/octet-stream' )


=== CMF/CMFCore/tests/test_FSImage.py 1.6 => 1.7 ===
--- CMF/CMFCore/tests/test_FSImage.py:1.6	Mon Dec 23 15:15:20 2002
+++ CMF/CMFCore/tests/test_FSImage.py	Fri Jan 10 05:24:32 2003
@@ -61,10 +61,10 @@
 
         self.assertEqual( len( data ), len( ref ) )
         self.assertEqual( data, ref )
-        #
-        #   ICK!  'HTTPResponse.getHeader' doesn't case-flatten the key!
-        #
-        self.assertEqual( self.RESPONSE.getHeader( 'Content-Length'.lower() )
+        # 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() ) )
                         , str(len(ref)) )
         self.assertEqual( self.RESPONSE.getHeader( 'Content-Type'.lower() )
                         , 'image/gif' )