[Zope3-checkins]
SVN: Zope3/branches/Zope-3.1/src/zope/app/authentication/
Merged revision 38032 from the trunk:
Dmitry Vasiliev
dima at hlabs.spb.ru
Tue Aug 23 06:40:59 EDT 2005
Log message for revision 38040:
Merged revision 38032 from the trunk:
Make sure events implement right interfaces
Changed:
U Zope3/branches/Zope-3.1/src/zope/app/authentication/interfaces.py
U Zope3/branches/Zope-3.1/src/zope/app/authentication/tests.py
-=-
Modified: Zope3/branches/Zope-3.1/src/zope/app/authentication/interfaces.py
===================================================================
--- Zope3/branches/Zope-3.1/src/zope/app/authentication/interfaces.py 2005-08-23 10:11:19 UTC (rev 38039)
+++ Zope3/branches/Zope-3.1/src/zope/app/authentication/interfaces.py 2005-08-23 10:40:59 UTC (rev 38040)
@@ -163,6 +163,13 @@
class AuthenticatedPrincipalCreated:
+ """
+ >>> from zope.interface.verify import verifyObject
+ >>> event = AuthenticatedPrincipalCreated("authentication", "principal",
+ ... "info", "request")
+ >>> verifyObject(IAuthenticatedPrincipalCreated, event)
+ True
+ """
zope.interface.implements(IAuthenticatedPrincipalCreated)
@@ -178,6 +185,13 @@
class FoundPrincipalCreated:
+ """
+ >>> from zope.interface.verify import verifyObject
+ >>> event = FoundPrincipalCreated("authentication", "principal",
+ ... "info")
+ >>> verifyObject(IFoundPrincipalCreated, event)
+ True
+ """
zope.interface.implements(IFoundPrincipalCreated)
@@ -217,16 +231,23 @@
"""
class IGroupAdded(zope.interface.Interface):
+ """A group has been added."""
group = zope.interface.Attribute("""The group that was defined""")
class GroupAdded:
+ """
+ >>> from zope.interface.verify import verifyObject
+ >>> event = GroupAdded("group")
+ >>> verifyObject(IGroupAdded, event)
+ True
+ """
zope.interface.implements(IGroupAdded)
- def __init__(self, principal):
- self.principal = principal
+ def __init__(self, group):
+ self.group = group
def __repr__(self):
- return "<GroupAdded %r>" % self.principal.id
+ return "<GroupAdded %r>" % self.group.id
Modified: Zope3/branches/Zope-3.1/src/zope/app/authentication/tests.py
===================================================================
--- Zope3/branches/Zope-3.1/src/zope/app/authentication/tests.py 2005-08-23 10:11:19 UTC (rev 38039)
+++ Zope3/branches/Zope-3.1/src/zope/app/authentication/tests.py 2005-08-23 10:40:59 UTC (rev 38040)
@@ -95,6 +95,7 @@
def test_suite():
return unittest.TestSuite((
+ doctest.DocTestSuite('zope.app.authentication.interfaces'),
doctest.DocTestSuite('zope.app.authentication.generic'),
doctest.DocTestSuite('zope.app.authentication.httpplugins'),
doctest.DocTestSuite('zope.app.authentication.ftpplugins'),
More information about the Zope3-Checkins
mailing list