[Checkins] SVN: PluggableAuthService/branches/1.5/ - Add a test for manage_zmi_logout and replace a call to isImplementedBy

Jens Vagelpohl jens at dataflake.org
Sun Sep 2 15:08:46 EDT 2007


Log message for revision 79440:
  - Add a test for manage_zmi_logout and replace a call to isImplementedBy
    with providedBy.
    (http://www.zope.org/Collectors/PAS/58)
  

Changed:
  U   PluggableAuthService/branches/1.5/__init__.py
  U   PluggableAuthService/branches/1.5/doc/CHANGES.txt
  U   PluggableAuthService/branches/1.5/tests/test_UserFolder.py

-=-
Modified: PluggableAuthService/branches/1.5/__init__.py
===================================================================
--- PluggableAuthService/branches/1.5/__init__.py	2007-09-02 16:27:21 UTC (rev 79439)
+++ PluggableAuthService/branches/1.5/__init__.py	2007-09-02 19:08:46 UTC (rev 79440)
@@ -87,7 +87,7 @@
     realm=RESPONSE.realm
     RESPONSE.setHeader('WWW-Authenticate', 'basic realm="%s"' % realm, 1)
 
-    if IPluggableAuthService.isImplementedBy(acl_users):
+    if IPluggableAuthService.providedBy(acl_users):
         acl_users.resetCredentials(REQUEST, RESPONSE)
     else:
         raise Unauthorized, '<p>You have been logged out.</p>'

Modified: PluggableAuthService/branches/1.5/doc/CHANGES.txt
===================================================================
--- PluggableAuthService/branches/1.5/doc/CHANGES.txt	2007-09-02 16:27:21 UTC (rev 79439)
+++ PluggableAuthService/branches/1.5/doc/CHANGES.txt	2007-09-02 19:08:46 UTC (rev 79440)
@@ -1,5 +1,14 @@
 PluggableAuthService changelog
 
+  PluggableAuthService 1.5.1 (unreleased)
+
+    Others
+
+      - Add a test for manage_zmi_logout and replace a call to isImplementedBy
+        with providedBy.
+        (http://www.zope.org/Collectors/PAS/58)
+
+
   PluggableAuthService 1.5 (06/17/2006)
 
     Features Added

Modified: PluggableAuthService/branches/1.5/tests/test_UserFolder.py
===================================================================
--- PluggableAuthService/branches/1.5/tests/test_UserFolder.py	2007-09-02 16:27:21 UTC (rev 79439)
+++ PluggableAuthService/branches/1.5/tests/test_UserFolder.py	2007-09-02 19:08:46 UTC (rev 79440)
@@ -254,7 +254,15 @@
 
         self.assertEqual(uid_and_info, (USER_ID, USER_ID))
 
+    def test_manage_zmi_logout(self):
+        request = self.app.REQUEST
+        response = request.RESPONSE
+        self.folder.manage_zmi_logout(request, response)
+        self.assertEqual(response.status, 401)
+        self.assertEqual(response.headers.get('WWW-Authenticate'),
+                         'basic realm="%s"' % response.realm)
 
+
 class UserTests(pastc.PASTestCase):
 
     def afterSetUp(self):



More information about the Checkins mailing list