[Checkins] SVN: Products.PluggableAuthService/branches/1.6/Products/PluggableAuthService/ Launchpad #300321: ZODBGroupManager.enumerateGroups failed to find groups with unicode IDs.
Tres Seaver
tseaver at palladion.com
Thu Nov 20 10:02:16 EST 2008
Log message for revision 93159:
Launchpad #300321: ZODBGroupManager.enumerateGroups failed to find groups with unicode IDs.
Changed:
U Products.PluggableAuthService/branches/1.6/Products/PluggableAuthService/doc/CHANGES.txt
U Products.PluggableAuthService/branches/1.6/Products/PluggableAuthService/plugins/ZODBGroupManager.py
U Products.PluggableAuthService/branches/1.6/Products/PluggableAuthService/plugins/tests/test_ZODBGroupManager.py
U Products.PluggableAuthService/branches/1.6/Products/PluggableAuthService/version.txt
-=-
Modified: Products.PluggableAuthService/branches/1.6/Products/PluggableAuthService/doc/CHANGES.txt
===================================================================
--- Products.PluggableAuthService/branches/1.6/Products/PluggableAuthService/doc/CHANGES.txt 2008-11-20 15:01:52 UTC (rev 93158)
+++ Products.PluggableAuthService/branches/1.6/Products/PluggableAuthService/doc/CHANGES.txt 2008-11-20 15:02:16 UTC (rev 93159)
@@ -1,6 +1,12 @@
PluggableAuthService changelog
==============================
+PluggableAuthService 1.6.1 (unreleased)
+---------------------------------------
+
+- Launchpad #300321: ZODBGroupManager.enumerateGroups failed to find
+ groups with unicode IDs.
+
PluggableAuthService 1.6 (2008-08-05)
-------------------------------------
Modified: Products.PluggableAuthService/branches/1.6/Products/PluggableAuthService/plugins/ZODBGroupManager.py
===================================================================
--- Products.PluggableAuthService/branches/1.6/Products/PluggableAuthService/plugins/ZODBGroupManager.py 2008-11-20 15:01:52 UTC (rev 93158)
+++ Products.PluggableAuthService/branches/1.6/Products/PluggableAuthService/plugins/ZODBGroupManager.py 2008-11-20 15:02:16 UTC (rev 93159)
@@ -90,10 +90,10 @@
group_ids = []
plugin_id = self.getId()
- if isinstance( id, str ):
+ if isinstance( id, basestring ):
id = [ id ]
- if isinstance( title, str ):
+ if isinstance( title, basestring ):
title = [ title ]
if exact_match and ( id or title ):
Modified: Products.PluggableAuthService/branches/1.6/Products/PluggableAuthService/plugins/tests/test_ZODBGroupManager.py
===================================================================
--- Products.PluggableAuthService/branches/1.6/Products/PluggableAuthService/plugins/tests/test_ZODBGroupManager.py 2008-11-20 15:01:52 UTC (rev 93158)
+++ Products.PluggableAuthService/branches/1.6/Products/PluggableAuthService/plugins/tests/test_ZODBGroupManager.py 2008-11-20 15:02:16 UTC (rev 93159)
@@ -193,6 +193,38 @@
self.assertEqual( zgm.enumerateGroups( id='qux', exact_match=True )
, () )
+ def test_enumerateGroups_exact_string( self ):
+ from Products.PluggableAuthService.tests.test_PluggableAuthService \
+ import FauxRoot
+
+ root = FauxRoot()
+ zgm = self._makeOne(id='exact_nonesuch').__of__(root)
+
+ ID_LIST = ('foo', 'bar', 'baz', 'bam')
+
+ for id in ID_LIST:
+ zgm.addGroup(id, 'Group %s' % id, 'This is group, %s' % id)
+
+ info = zgm.enumerateGroups(id='foo', exact_match=True)
+ self.assertEqual(len(info), 1)
+ self.assertEqual(info[0]['id'], 'foo')
+
+ def test_enumerateGroups_exact_unicode( self ):
+ from Products.PluggableAuthService.tests.test_PluggableAuthService \
+ import FauxRoot
+
+ root = FauxRoot()
+ zgm = self._makeOne(id='exact_nonesuch').__of__(root)
+
+ ID_LIST = ('foo', 'bar', 'baz', 'bam')
+
+ for id in ID_LIST:
+ zgm.addGroup(id, 'Group %s' % id, 'This is group, %s' % id)
+
+ info = zgm.enumerateGroups(id=u'foo', exact_match=True)
+ self.assertEqual(len(info), 1)
+ self.assertEqual(info[0]['id'], 'foo')
+
def test_enumerateGroups_multiple( self ):
from Products.PluggableAuthService.tests.test_PluggableAuthService \
import FauxRoot
@@ -203,7 +235,6 @@
ID_LIST = ( 'foo', 'bar', 'baz', 'bam' )
for id in ID_LIST:
-
zrm.addGroup( id, 'Group %s' % id, 'This is group, %s' % id )
info_list = zrm.enumerateGroups( id=ID_LIST, exact_match=False )
Modified: Products.PluggableAuthService/branches/1.6/Products/PluggableAuthService/version.txt
===================================================================
--- Products.PluggableAuthService/branches/1.6/Products/PluggableAuthService/version.txt 2008-11-20 15:01:52 UTC (rev 93158)
+++ Products.PluggableAuthService/branches/1.6/Products/PluggableAuthService/version.txt 2008-11-20 15:02:16 UTC (rev 93159)
@@ -1 +1 @@
-1.6
+1.6.1dev
More information about the Checkins
mailing list