[Checkins] SVN: grok/branches/jw-define-roles-directive/src/grok/ftests/security/roles.py Let the browser handle errors to get readable HTTPErrors in the test.

Jan-Wijbrand Kolman janwijbrand at gmail.com
Thu Jul 26 04:53:55 EDT 2007


Log message for revision 78347:
  Let the browser handle errors to get readable HTTPErrors in the test.

Changed:
  U   grok/branches/jw-define-roles-directive/src/grok/ftests/security/roles.py

-=-
Modified: grok/branches/jw-define-roles-directive/src/grok/ftests/security/roles.py
===================================================================
--- grok/branches/jw-define-roles-directive/src/grok/ftests/security/roles.py	2007-07-26 08:08:47 UTC (rev 78346)
+++ grok/branches/jw-define-roles-directive/src/grok/ftests/security/roles.py	2007-07-26 08:53:53 UTC (rev 78347)
@@ -23,7 +23,6 @@
   >>> principalRoleManager.assignRoleToPrincipal(
   ...    'grok.PaintingOwner', 'zope.mgr')
   >>> browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-  >>> browser.handleErrors = False
   >>> browser.open("http://localhost/@@cavepainting")
   >>> print browser.contents
   What a beautiful painting.
@@ -38,10 +37,7 @@
 
   >>> browser.open("http://localhost/@@approvecavepainting")
   Traceback (most recent call last):
-  ...
-  Unauthorized: (<grok.ftests.security.roles.ApproveCavePainting object at ...>,
-  '__call__', 'grok.ApprovePainting')
-
+  HTTPError: HTTP Error 403: Forbidden
 """
 
 import grok



More information about the Checkins mailing list