[Checkins] SVN: Products.CMFCore/trunk/Products/CMFCore/tests/test_CookieCrumbler.py Use the more common headers attribute of the response instead of relying on the uncommon dict access of the response itself

Hanno Schlichting hannosch at hannosch.eu
Mon May 11 21:09:49 EDT 2009


Log message for revision 99859:
  Use the more common headers attribute of the response instead of relying on the uncommon dict access of the response itself
  

Changed:
  U   Products.CMFCore/trunk/Products/CMFCore/tests/test_CookieCrumbler.py

-=-
Modified: Products.CMFCore/trunk/Products/CMFCore/tests/test_CookieCrumbler.py
===================================================================
--- Products.CMFCore/trunk/Products/CMFCore/tests/test_CookieCrumbler.py	2009-05-12 00:57:46 UTC (rev 99858)
+++ Products.CMFCore/trunk/Products/CMFCore/tests/test_CookieCrumbler.py	2009-05-12 01:09:48 UTC (rev 99859)
@@ -253,14 +253,16 @@
         req.cookies['__ac_name'] = 'abraham'
         req.cookies['__ac_password'] = 'pass-w'
         req.traverse('/')
-        self.assertEqual(req.response['cache-control'], 'private')
+        self.assertEqual(
+            req.response.headers.get('cache-control', ''), 'private')
 
     def testCacheHeaderAuthenticated(self):
         # Should set cache-control
         root, cc, req, credentials = self._makeSite()
         req.cookies['__ac'] = credentials
         req.traverse('/')
-        self.assertEqual(req.response['cache-control'], 'private')
+        self.assertEqual(
+            req.response.headers.get('cache-control', ''), 'private')
 
     def testCacheHeaderDisabled(self):
         # Should not set cache-control



More information about the Checkins mailing list