[Zope3-checkins]
SVN: Zope3/trunk/src/zope/app/security/vocabulary.py
Sprinting with Jim:
Stephan Richter
srichter at cosmos.phy.tufts.edu
Wed Oct 13 10:57:37 EDT 2004
Log message for revision 28091:
Sprinting with Jim:
Fixed API implementation to be correct.
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-10-13 14:55:41 UTC (rev 28090)
+++ Zope3/trunk/src/zope/app/security/vocabulary.py 2004-10-13 14:57:35 UTC (rev 28091)
@@ -162,7 +162,7 @@
... implements(ISourceQueriables)
... __parent__ = None
... def getQueriables(self):
- ... return 1, 2, 3
+ ... return ('1', 1), ('2', 2), ('3', 3)
>>> dummy2 = DummyService2()
>>> from zope.app.component.localservice import testingNextService
@@ -173,18 +173,19 @@
>>> source = PrincipalSource()
>>> list(source.getQueriables())
- [dummy1, 1, 2, 3]
+ [(u'0', dummy1), (u'0.1', 1), (u'0.2', 2), (u'0.3', 3)]
>>> zapi.getService = temp
"""
+ i = 0
auth = zapi.getService(zapi.servicenames.Authentication)
while True:
queriables = ISourceQueriables(auth, None)
if queriables is None:
- yield auth
+ yield unicode(i), auth
else:
- for queriable in queriables.getQueriables():
- yield queriable
+ for qid, queriable in queriables.getQueriables():
+ yield unicode(i)+'.'+unicode(qid), queriable
auth = queryNextService(auth, zapi.servicenames.Authentication)
if auth is None:
break
More information about the Zope3-Checkins
mailing list