[CMF-checkins] CVS: Products/CMFCore/tests -
test_FSFile.py:1.8.14.3 test_FSImage.py:1.10.14.3
Chris McDonough
chrism at plope.com
Thu Jul 7 12:51:18 EDT 2005
Update of /cvs-repository/Products/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv15724/CMFCore/tests
Modified Files:
Tag: CMF-1_5-branch
test_FSFile.py test_FSImage.py
Log Message:
Fix for #333, FSFile does not update caching headers on a 304.
=== Products/CMFCore/tests/test_FSFile.py 1.8.14.2 => 1.8.14.3 ===
--- Products/CMFCore/tests/test_FSFile.py:1.8.14.2 Sun Nov 14 18:52:10 2004
+++ Products/CMFCore/tests/test_FSFile.py Thu Jul 7 12:51:12 2005
@@ -1,3 +1,19 @@
+##############################################################################
+#
+# Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+""" Unit tests for FSFile module.
+
+$Id$
+"""
import unittest
import Testing
import Zope
@@ -101,6 +117,9 @@
data = file.index_html( self.REQUEST, self.RESPONSE )
self.assertEqual( data, '' )
+ # test that we properly hack around apache bug noted in code
+ self.assertEqual( self.RESPONSE.getHeader('Content-Length'.lower()),
+ str(len(ref)) )
self.assertEqual( self.RESPONSE.getStatus(), 304 )
def test_index_html_without_304( self ):
=== Products/CMFCore/tests/test_FSImage.py 1.10.14.2 => 1.10.14.3 ===
--- Products/CMFCore/tests/test_FSImage.py:1.10.14.2 Wed Jun 8 09:16:36 2005
+++ Products/CMFCore/tests/test_FSImage.py Thu Jul 7 12:51:12 2005
@@ -1,3 +1,19 @@
+##############################################################################
+#
+# Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+""" Unit tests for FSImage module.
+
+$Id$
+"""
import unittest
import Testing
import Zope
@@ -89,6 +105,9 @@
data = image.index_html( self.REQUEST, self.RESPONSE )
self.assertEqual( data, '' )
+ # test that we properly hack around apache bug noted in code
+ self.assertEqual( self.RESPONSE.getHeader('Content-Length'.lower()),
+ str(len(ref)) )
self.assertEqual( self.RESPONSE.getStatus(), 304 )
def test_index_html_without_304( self ):
More information about the CMF-checkins
mailing list