[Zope-Checkins] CVS: Zope/lib/python/OFS/tests - testRanges.py:1.14.2.2

Chris McDonough chrism@zope.com
Fri, 3 Jan 2003 01:31:49 -0500


Update of /cvs-repository/Zope/lib/python/OFS/tests
In directory cvs.zope.org:/tmp/cvs-serv26867/tests

Modified Files:
      Tag: chrism-install-branch
	testRanges.py 
Log Message:
Merging chrism-install-branch with HEAD (hopefully for one of the last
times).



=== Zope/lib/python/OFS/tests/testRanges.py 1.14.2.1 => 1.14.2.2 ===
--- Zope/lib/python/OFS/tests/testRanges.py:1.14.2.1	Sun Nov 24 18:42:25 2002
+++ Zope/lib/python/OFS/tests/testRanges.py	Fri Jan  3 01:31:46 2003
@@ -164,9 +164,9 @@
         self.failUnless(content_range == expect_content_range,
             'Received incorrect Content-Range header. Expected %s, got %s' % (
                 `expect_content_range`, `content_range`))
-        self.failIf(rsp.getHeader('content-length') != len(body),
-            'Incorrect Content-Length is set! Expected %d, got %d.' % (
-                rsp.getHeader('content-length'), len(body)))
+        self.failIf(rsp.getHeader('content-length') != str(len(body)),
+            'Incorrect Content-Length is set! Expected %s, got %s.' % (
+                str(len(body)), rsp.getHeader('content-length')))
 
         self.failUnless(body == self.data[start:end],
             'Incorrect range returned, expected %s, got %s' % (
@@ -196,9 +196,9 @@
             "Incorrect Content-Type set. Expected 'multipart/%sbyteranges', "
             "got %s" % (draftprefix, ct))
         if rsp.getHeader('content-length'):
-            self.failIf(rsp.getHeader('content-length') != len(body),
-                'Incorrect Content-Length is set! Expected %d, got %d.' % (
-                    len(body), rsp.getHeader('content-length')))
+            self.failIf(rsp.getHeader('content-length') != str(len(body)),
+                'Incorrect Content-Length is set! Expected %s, got %s.' % (
+                    str(len(body)), rsp.getHeader('content-length')))
 
         # Decode the multipart message
         bodyfile = cStringIO.StringIO('Content-Type: %s\n\n%s' % (