[Zope3-checkins]
SVN: Zope3/trunk/src/zope/app/security/vocabulary.py
Fixed the grant.html bug.
Shane Hathaway
shane at zope.com
Wed Nov 24 13:16:36 EST 2004
Log message for revision 28499:
Fixed the grant.html bug.
The PrincipalSource vocabulary was not assigning unique names because
of a simple oversight in not incrementing a loop variable. Augmented
the doctest.
Changed:
U Zope3/trunk/src/zope/app/security/vocabulary.py
-=-
Modified: Zope3/trunk/src/zope/app/security/vocabulary.py
===================================================================
--- Zope3/trunk/src/zope/app/security/vocabulary.py 2004-11-24 17:45:50 UTC (rev 28498)
+++ Zope3/trunk/src/zope/app/security/vocabulary.py 2004-11-24 18:16:35 UTC (rev 28499)
@@ -184,16 +184,22 @@
... def getQueriables(self):
... return ('1', 1), ('2', 2), ('3', 3)
>>> dummy2 = DummyService2()
-
+
+ >>> class DummyService3(DummyService2):
+ ... def getQueriables(self):
+ ... return ('4', 4),
+ >>> dummy3 = DummyService3()
+
>>> from zope.app.component.localservice import testingNextService
>>> testingNextService(dummy1, dummy2, 'Authentication')
+ >>> testingNextService(dummy2, dummy3, 'Authentication')
>>> temp = zapi.getService
>>> zapi.getService = lambda name: dummy1
>>> source = PrincipalSource()
>>> list(source.getQueriables())
- [(u'0', dummy1), (u'0.1', 1), (u'0.2', 2), (u'0.3', 3)]
+ [(u'0', dummy1), (u'1.1', 1), (u'1.2', 2), (u'1.3', 3), (u'2.4', 4)]
>>> zapi.getService = temp
"""
@@ -209,3 +215,4 @@
auth = queryNextService(auth, zapi.servicenames.Authentication)
if auth is None:
break
+ i += 1
More information about the Zope3-Checkins
mailing list