[Checkins] SVN: zope.pluggableauth/trunk/src/zope/pluggableauth/ pep8 cosmetics.
Souheil CHELFOUH
souheil at chelfouh.com
Sun Jan 24 18:27:41 EST 2010
Log message for revision 108453:
pep8 cosmetics.
Changed:
U zope.pluggableauth/trunk/src/zope/pluggableauth/authentication.py
U zope.pluggableauth/trunk/src/zope/pluggableauth/factories.py
U zope.pluggableauth/trunk/src/zope/pluggableauth/interfaces.py
U zope.pluggableauth/trunk/src/zope/pluggableauth/tests.py
-=-
Modified: zope.pluggableauth/trunk/src/zope/pluggableauth/authentication.py
===================================================================
--- zope.pluggableauth/trunk/src/zope/pluggableauth/authentication.py 2010-01-24 23:18:34 UTC (rev 108452)
+++ zope.pluggableauth/trunk/src/zope/pluggableauth/authentication.py 2010-01-24 23:27:41 UTC (rev 108453)
@@ -16,7 +16,8 @@
$Id$
"""
from zope import component
-from zope.authentication.interfaces import IAuthentication, PrincipalLookupError
+from zope.authentication.interfaces import (
+ IAuthentication, PrincipalLookupError)
from zope.container.btree import BTreeContainer
from zope.interface import implements
from zope.pluggableauth import interfaces
Modified: zope.pluggableauth/trunk/src/zope/pluggableauth/factories.py
===================================================================
--- zope.pluggableauth/trunk/src/zope/pluggableauth/factories.py 2010-01-24 23:18:34 UTC (rev 108452)
+++ zope.pluggableauth/trunk/src/zope/pluggableauth/factories.py 2010-01-24 23:27:41 UTC (rev 108453)
@@ -87,7 +87,7 @@
The `allGroups` attribute is a readonly iterable of the full closure of the
groups in the `groups` attribute--that is, if the principal is a direct
member of the 'Administrators' group, and the 'Administrators' group is
- a member of the 'Reviewers' group, then p.groups would be
+ a member of the 'Reviewers' group, then p.groups would be
['Administrators'] and list(p.allGroups) would be
['Administrators', 'Reviewers'].
@@ -95,7 +95,7 @@
and a few principals. Our main principal will also gain some groups, as if
plugins had added the groups to the list. This is all setup--skip to the
next block to actually see `allGroups` in action.
-
+
>>> p.groups.extend(
... ['content_administrators', 'zope_3_project',
... 'list_administrators', 'zpug'])
Modified: zope.pluggableauth/trunk/src/zope/pluggableauth/interfaces.py
===================================================================
--- zope.pluggableauth/trunk/src/zope/pluggableauth/interfaces.py 2010-01-24 23:18:34 UTC (rev 108452)
+++ zope.pluggableauth/trunk/src/zope/pluggableauth/interfaces.py 2010-01-24 23:27:41 UTC (rev 108453)
@@ -48,7 +48,7 @@
description=_("""Used for extracting credentials.
Names may be of ids of non-utility ICredentialsPlugins contained in
the IPluggableAuthentication, or names of registered
- ICredentialsPlugins utilities. Contained non-utility ids mask
+ ICredentialsPlugins utilities. Contained non-utility ids mask
utility names."""),
value_type=zope.schema.Choice(vocabulary='CredentialsPlugins'),
default=[],
@@ -59,7 +59,7 @@
description=_("""Used for converting credentials to principals.
Names may be of ids of non-utility IAuthenticatorPlugins contained in
the IPluggableAuthentication, or names of registered
- IAuthenticatorPlugins utilities. Contained non-utility ids mask
+ IAuthenticatorPlugins utilities. Contained non-utility ids mask
utility names."""),
value_type=zope.schema.Choice(vocabulary='AuthenticatorPlugins'),
default=[],
Modified: zope.pluggableauth/trunk/src/zope/pluggableauth/tests.py
===================================================================
--- zope.pluggableauth/trunk/src/zope/pluggableauth/tests.py 2010-01-24 23:18:34 UTC (rev 108452)
+++ zope.pluggableauth/trunk/src/zope/pluggableauth/tests.py 2010-01-24 23:27:41 UTC (rev 108453)
@@ -17,8 +17,8 @@
"""
__docformat__ = "reStructuredText"
-import doctest, unittest
-
+import doctest
+import unittest
from zope.app.testing import placelesssetup
from zope.app.testing.setup import placefulSetUp, placefulTearDown
from zope.component import provideUtility, provideAdapter, provideHandler
@@ -36,6 +36,7 @@
class TestClientId(object):
implements(IClientId)
+
def __new__(cls, request):
return 'dummyclientidfortesting'
@@ -68,8 +69,10 @@
class NonHTTPSessionTestCase(unittest.TestCase):
- # Small test suite to catch an error with non HTTP protocols, like FTP
- # and SessionCredentialsPlugin.
+ """Small test suite to catch an error with non HTTP protocols,
+ like FTP and SessionCredentialsPlugin.
+ """
+
def setUp(self):
nonHTTPSessionTestCaseSetUp()
@@ -78,20 +81,20 @@
def test_exeractCredentials(self):
plugin = SessionCredentialsPlugin()
+ self.assertEqual(
+ plugin.extractCredentials(base.TestRequest('/')), None)
- self.assertEqual(plugin.extractCredentials(base.TestRequest('/')), None)
-
def test_challenge(self):
plugin = SessionCredentialsPlugin()
+ self.assertEqual(
+ plugin.challenge(base.TestRequest('/')), False)
- self.assertEqual(plugin.challenge(base.TestRequest('/')), False)
-
def test_logout(self):
plugin = SessionCredentialsPlugin()
+ self.assertEqual(
+ plugin.logout(base.TestRequest('/')), False)
- self.assertEqual(plugin.logout(base.TestRequest('/')), False)
-
def test_suite():
suite = unittest.TestSuite((
unittest.makeSuite(NonHTTPSessionTestCase),
More information about the checkins
mailing list