[Zope-Checkins] SVN: Zope/trunk/ Made ZPublisher tests compatible with Python 2.7.

Hanno Schlichting hannosch at hannosch.eu
Mon Jul 5 16:41:54 EDT 2010


Log message for revision 114217:
  Made ZPublisher tests compatible with Python 2.7.
  

Changed:
  U   Zope/trunk/doc/CHANGES.rst
  U   Zope/trunk/src/ZPublisher/tests/exception_handling.txt

-=-
Modified: Zope/trunk/doc/CHANGES.rst
===================================================================
--- Zope/trunk/doc/CHANGES.rst	2010-07-05 17:38:31 UTC (rev 114216)
+++ Zope/trunk/doc/CHANGES.rst	2010-07-05 20:41:53 UTC (rev 114217)
@@ -11,6 +11,8 @@
 Bugs Fixed
 ++++++++++
 
+- Made ZPublisher tests compatible with Python 2.7.
+
 - LP #143531: Fix broken object so they give access to their state.
 
 - LP #578326: Issue a warning if someone specifies a non-public permission

Modified: Zope/trunk/src/ZPublisher/tests/exception_handling.txt
===================================================================
--- Zope/trunk/src/ZPublisher/tests/exception_handling.txt	2010-07-05 17:38:31 UTC (rev 114216)
+++ Zope/trunk/src/ZPublisher/tests/exception_handling.txt	2010-07-05 20:41:53 UTC (rev 114217)
@@ -164,10 +164,13 @@
     'basic realm="Zope2"'
 
     >>> browser.handleErrors = False
-    >>> browser.open('http://localhost/test_folder_1_/foo')
-    Traceback (most recent call last):
-    ...
-    Unauthorized: <unprintable ... object>
+    >>> try:
+    ...     browser.open('http://localhost/test_folder_1_/foo')
+    ... except Unauthorized, e:
+    ...     e._message == u'ERROR VALUE \u03A9'
+    ... else:
+    ...     print "Unauthorized not raised"
+    True
     >>> browser.contents
 
 Handle zExceptions.Unauthorized raised by BaseRequest.traverse. We take the



More information about the Zope-Checkins mailing list