[Checkins] SVN: Products.PluggableAuthService/trunk/Products/PluggableAuthService/plugins/ Forward-port fix for LP# 189627.

Tres Seaver tseaver at palladion.com
Wed Feb 6 14:00:09 EST 2008


Log message for revision 83602:
  Forward-port fix for LP# 189627.

Changed:
  U   Products.PluggableAuthService/trunk/Products/PluggableAuthService/plugins/ZODBUserManager.py
  U   Products.PluggableAuthService/trunk/Products/PluggableAuthService/plugins/tests/test_ZODBUserManager.py

-=-
Modified: Products.PluggableAuthService/trunk/Products/PluggableAuthService/plugins/ZODBUserManager.py
===================================================================
--- Products.PluggableAuthService/trunk/Products/PluggableAuthService/plugins/ZODBUserManager.py	2008-02-06 18:26:51 UTC (rev 83601)
+++ Products.PluggableAuthService/trunk/Products/PluggableAuthService/plugins/ZODBUserManager.py	2008-02-06 19:00:09 UTC (rev 83602)
@@ -139,10 +139,10 @@
         view_name = createViewName('enumerateUsers', id or login)
 
 
-        if isinstance( id, str ):
+        if isinstance( id, basestring ):
             id = [ id ]
 
-        if isinstance( login, str ):
+        if isinstance( login, basestring ):
             login = [ login ]
 
         # Look in the cache first...

Modified: Products.PluggableAuthService/trunk/Products/PluggableAuthService/plugins/tests/test_ZODBUserManager.py
===================================================================
--- Products.PluggableAuthService/trunk/Products/PluggableAuthService/plugins/tests/test_ZODBUserManager.py	2008-02-06 18:26:51 UTC (rev 83601)
+++ Products.PluggableAuthService/trunk/Products/PluggableAuthService/plugins/tests/test_ZODBUserManager.py	2008-02-06 19:00:09 UTC (rev 83602)
@@ -264,6 +264,24 @@
                                         exact_match=False )
         self.assertEqual( len( info_list ), 0 )
 
+    def test_enumerateUsers_unicode( self ):
+
+        from Products.PluggableAuthService.tests.test_PluggableAuthService \
+            import FauxRoot
+
+        root = FauxRoot()
+        zum = self._makeOne( id='partial' ).__of__( root )
+
+        ID_LIST = ( 'foo', 'bar', 'baz', 'bam' )
+
+        for id in ID_LIST:
+
+            zum.addUser( id, '%s at example.com' % id, 'password' )
+
+        info_list = zum.enumerateUsers( id = u'abc',
+                                        exact_match=False )
+        self.assertEqual( len( info_list ), 0 )
+
     def test_enumerateUsers_exact_nonesuch( self ):
 
         from Products.PluggableAuthService.tests.test_PluggableAuthService \



More information about the Checkins mailing list