[Zope-CVS] CVS: Products/CookieCrumbler/tests - testCookieCrumbler.py:1.5
Shane Hathaway
shane@zope.com
Tue, 1 Jul 2003 12:42:26 -0400
Update of /cvs-repository/Products/CookieCrumbler/tests
In directory cvs.zope.org:/tmp/cvs-serv31567/tests
Modified Files:
testCookieCrumbler.py
Log Message:
CookieCrumbler now lets you disable or modify the Cache-Control header
to work around MSIE's irrational handling of the Cache-Control header.
See MS knowledge base article #316431, currently found at:
http://support.microsoft.com/support/kb/articles/q316/4/31.asp
Thanks to Eric Brun for pointing this out.
=== Products/CookieCrumbler/tests/testCookieCrumbler.py 1.4 => 1.5 ===
--- Products/CookieCrumbler/tests/testCookieCrumbler.py:1.4 Wed Jun 18 11:49:41 2003
+++ Products/CookieCrumbler/tests/testCookieCrumbler.py Tue Jul 1 12:42:26 2003
@@ -66,6 +66,7 @@
cc = CookieCrumbler()
cc.id = 'cookie_authentication'
root._setObject(cc.id, cc)
+ self.cc = getattr(root, cc.id)
index = DTMLMethod()
index.munge('This is the default view')
@@ -211,6 +212,15 @@
self.req.cookies['__ac'] = self.credentials
self.req.traverse('/')
self.assertEqual(self.req.response['cache-control'], 'no-cache')
+
+
+ def testCacheHeaderDisabled(self):
+ # Should not set cache-control
+ self.cc.cache_header_value = ''
+ self.req.cookies['__ac'] = self.credentials
+ self.req.traverse('/')
+ self.assertEqual(
+ self.req.response.headers.get('cache-control', ''), '')
def testDisableLoginDoesNotPreventPasswordShredding(self):