CVS: Products/PluggableAuthService/tests - conformance.py:1.5

Sidnei da Silva <[email protected]>
Newsgroups gmane.comp.web.zope.public-cvs
Message-ID <[email protected]>
Update of /cvs-repository/Products/PluggableAuthService/tests
In directory cvs.zope.org:/tmp/cvs-serv13697/tests

Modified Files:
	conformance.py 
Log Message:

Merge changes from sidnei-challenge-protocol-chooser:

    - Added two new interfaces, IChallengeProtocolChooser and
      IRequestTypeSniffer. Those are used to select the 'authorization
      protocol' or 'challenger protocol' to be used for challenging
      according to the incoming request type.

    - Fixed a couple more places where Zope 2-style __implements__
      where being used to standardize on using classImplements.

    - Fixed fallback implementations of providedBy and
      implementedBy to always return a tuple.

    - Make sure challenge doesn't break if existing instances of the
      PluginRegistry don't yet have IChallengeProtocolChooser as a
      registered interface. (Would be nice to have some sort of
      migration for the PluginRegistry between PAS releases)

    - Don't assume that just because zope.interface can be imported
      that Five is present.


=== Products/PluggableAuthService/tests/conformance.py 1.4 => 1.5 ===
--- Products/PluggableAuthService/tests/conformance.py:1.4	Wed Jul  6 14:49:05 2005
+++ Products/PluggableAuthService/tests/conformance.py	Wed Aug 17 16:53:14 2005
@@ -17,14 +17,15 @@
 $Id$
 """
 
+try:
+    from zope.interface.verify import verifyClass
+except ImportError:
+    from Interface.Verify import verifyClass
+
 class IExtractionPlugin_conformance:
 
     def test_IExtractionPlugin_conformance( self ):
 
-        try:
-            from zope.interface.verify import verifyClass
-        except ImportError:
-            from Interface.Verify import verifyClass
         from Products.PluggableAuthService.interfaces.plugins \
             import IExtractionPlugin
 
@@ -34,10 +35,6 @@
 
     def test_ILoginPasswordExtractionPlugin_conformance( self ):
 
-        try:
-            from zope.interface.verify import verifyClass
-        except ImportError:
-            from Interface.Verify import verifyClass
         from Products.PluggableAuthService.interfaces.plugins \
             import ILoginPasswordExtractionPlugin
 
@@ -47,10 +44,6 @@
 
     def test_ILoginPasswordHostExtractionPlugin_conformance( self ):
 
-        try:
-            from zope.interface.verify import verifyClass
-        except ImportError:
-            from Interface.Verify import verifyClass
         from Products.PluggableAuthService.interfaces.plugins \
             import ILoginPasswordHostExtractionPlugin
 
@@ -61,10 +54,6 @@
 
     def test_IChallengePlugin_conformance( self ):
 
-        try:
-            from zope.interface.verify import verifyClass
-        except ImportError:
-            from Interface.Verify import verifyClass
         from Products.PluggableAuthService.interfaces.plugins \
             import IChallengePlugin
 
@@ -74,10 +63,6 @@
 
     def test_ICredentialsUpdatePlugin_conformance( self ):
 
-        try:
-            from zope.interface.verify import verifyClass
-        except ImportError:
-            from Interface.Verify import verifyClass
         from Products.PluggableAuthService.interfaces.plugins \
             import ICredentialsUpdatePlugin
 
@@ -87,10 +72,6 @@
 
     def test_ICredentialsResetPlugin_conformance( self ):
 
-        try:
-            from zope.interface.verify import verifyClass
-        except ImportError:
-            from Interface.Verify import verifyClass
         from Products.PluggableAuthService.interfaces.plugins \
             import ICredentialsResetPlugin
 
@@ -101,10 +82,6 @@
 
     def test_AuthenticationPlugin_conformance( self ):
 
-        try:
-            from zope.interface.verify import verifyClass
-        except ImportError:
-            from Interface.Verify import verifyClass
         from Products.PluggableAuthService.interfaces.plugins \
             import IAuthenticationPlugin
 
@@ -115,10 +92,6 @@
 
     def test_UserEnumerationPlugin_conformance( self ):
 
-        try:
-            from zope.interface.verify import verifyClass
-        except ImportError:
-            from Interface.Verify import verifyClass
         from Products.PluggableAuthService.interfaces.plugins \
             import IUserEnumerationPlugin
 
@@ -129,10 +102,6 @@
 
     def test_UserAdderPlugin_conformance( self ):
 
-        try:
-            from zope.interface.verify import verifyClass
-        except ImportError:
-            from Interface.Verify import verifyClass
         from Products.PluggableAuthService.interfaces.plugins \
             import IUserAdderPlugin
 
@@ -143,10 +112,6 @@
 
     def test_GroupEnumerationPlugin_conformance( self ):
 
-        try:
-            from zope.interface.verify import verifyClass
-        except ImportError:
-            from Interface.Verify import verifyClass
         from Products.PluggableAuthService.interfaces.plugins \
             import IGroupEnumerationPlugin
 
@@ -157,10 +122,6 @@
 
     def test_GroupsPlugin_conformance( self ):
 
-        try:
-            from zope.interface.verify import verifyClass
-        except ImportError:
-            from Interface.Verify import verifyClass
         from Products.PluggableAuthService.interfaces.plugins \
             import IGroupsPlugin
 
@@ -171,10 +132,6 @@
 
     def test_RoleEnumerationPlugin_conformance( self ):
 
-        try:
-            from zope.interface.verify import verifyClass
-        except ImportError:
-            from Interface.Verify import verifyClass
         from Products.PluggableAuthService.interfaces.plugins \
             import IRoleEnumerationPlugin
 
@@ -185,10 +142,6 @@
 
     def test_RolesPlugin_conformance( self ):
 
-        try:
-            from zope.interface.verify import verifyClass
-        except ImportError:
-            from Interface.Verify import verifyClass
         from Products.PluggableAuthService.interfaces.plugins \
             import IRolesPlugin
 
@@ -198,11 +151,25 @@
 
     def test_RoleAssignerPlugin_conformance( self ):
 
-        try:
-            from zope.interface.verify import verifyClass
-        except ImportError:
-            from Interface.Verify import verifyClass
         from Products.PluggableAuthService.interfaces.plugins \
             import IRoleAssignerPlugin
 
         verifyClass( IRoleAssignerPlugin, self._getTargetClass() )
+
+class IChallengeProtocolChooser_conformance:
+
+    def test_ChallengeProtocolChooser_conformance( self ):
+
+        from Products.PluggableAuthService.interfaces.plugins \
+            import IChallengeProtocolChooser
+
+        verifyClass( IChallengeProtocolChooser, self._getTargetClass() )
+
+class IRequestTypeSniffer_conformance:
+
+    def test_RequestTypeSniffer_conformance( self ):
+
+        from Products.PluggableAuthService.interfaces.plugins \
+            import IRequestTypeSniffer
+
+        verifyClass( IRequestTypeSniffer, self._getTargetClass() )

_______________________________________________
Zope-CVS maillist  -  [email protected]
http://mail.zope.org/mailman/listinfo/zope-cvs

Zope CVS instructions: http://dev.zope.org/CVS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.