[test/ldap] do not assume order
authorDavid Douard <david.douard@logilab.fr>
Tue, 30 Apr 2013 08:17:10 +0200
changeset 8959 69a78922114b
parent 8957 bf4003760e02
child 8960 14b1a7ace003
[test/ldap] do not assume order Do no assume a specific order is stable when testing group members
server/test/unittest_ldapsource.py
--- a/server/test/unittest_ldapsource.py	Mon Apr 29 12:34:23 2013 +0200
+++ b/server/test/unittest_ldapsource.py	Tue Apr 30 08:17:10 2013 +0200
@@ -399,8 +399,8 @@
             rset = self.sexecute('Any L WHERE U in_group G, G name %(name)s, U login L',
                                  {'name': 'logilab'})
             self.assertEqual(len(rset), 2)
-            self.assertEqual(rset[0][0], 'adim')
-            self.assertEqual(rset[1][0], 'syt')
+            members = set([u[0] for u in rset])
+            self.assertEqual(set(['adim', 'syt']), members)
 
         finally:
             # back to normal ldap setup