[Zope-Checkins] SVN: Zope/branches/2.12/ LP #142563: Fix AccessControl.User.NullUnrestrictedUserTests.__str__.
Tres Seaver
tseaver at palladion.com
Sun May 16 12:26:53 EDT 2010
Log message for revision 112356:
LP #142563: Fix AccessControl.User.NullUnrestrictedUserTests.__str__.
Changed:
U Zope/branches/2.12/doc/CHANGES.rst
U Zope/branches/2.12/src/AccessControl/User.py
U Zope/branches/2.12/src/AccessControl/tests/testUser.py
-=-
Modified: Zope/branches/2.12/doc/CHANGES.rst
===================================================================
--- Zope/branches/2.12/doc/CHANGES.rst 2010-05-16 16:26:51 UTC (rev 112355)
+++ Zope/branches/2.12/doc/CHANGES.rst 2010-05-16 16:26:52 UTC (rev 112356)
@@ -44,6 +44,8 @@
Bugs Fixed
++++++++++
+- LP #142563: Fix ``AccessControl.User.NullUnrestrictedUserTests.__str__``.
+
- Fix several template errors in SiteErrorLog (chameleon compatibility).
- LP #267820: Fix bad except clause in the ``sequence_sort`` method of
Modified: Zope/branches/2.12/src/AccessControl/User.py
===================================================================
--- Zope/branches/2.12/src/AccessControl/User.py 2010-05-16 16:26:51 UTC (rev 112355)
+++ Zope/branches/2.12/src/AccessControl/User.py 2010-05-16 16:26:52 UTC (rev 112356)
@@ -400,6 +400,9 @@
def has_permission(self, permission, object):
return 0
+ def __str__(self):
+ # See https://bugs.launchpad.net/zope2/+bug/142563
+ return repr(self)
def readUserAccessFile(filename):
Modified: Zope/branches/2.12/src/AccessControl/tests/testUser.py
===================================================================
--- Zope/branches/2.12/src/AccessControl/tests/testUser.py 2010-05-16 16:26:51 UTC (rev 112355)
+++ Zope/branches/2.12/src/AccessControl/tests/testUser.py 2010-05-16 16:26:52 UTC (rev 112356)
@@ -205,7 +205,12 @@
null = self._makeOne()
self.assertEqual(repr(null), "<NullUnrestrictedUser (None, None)>")
+ def test___str__(self):
+ # See https://bugs.launchpad.net/zope2/+bug/142563
+ null = self._makeOne()
+ self.assertEqual(str(null), "<NullUnrestrictedUser (None, None)>")
+
class UserTests(unittest.TestCase):
def _getTargetClass(self):
More information about the Zope-Checkins
mailing list