Fix ordering in LDAP test
This commit is contained in:
parent
bb20422260
commit
a17b637032
1 changed files with 13 additions and 7 deletions
|
@ -318,14 +318,20 @@ class TestLDAP(unittest.TestCase):
|
|||
self.assertEquals(2, len(results))
|
||||
|
||||
first = results[0][0]
|
||||
self.assertEquals('testy', first.id)
|
||||
self.assertEquals('testy', first.username)
|
||||
self.assertEquals('bar@baz.com', first.email)
|
||||
|
||||
second = results[1][0]
|
||||
self.assertEquals('someuser', second.id)
|
||||
self.assertEquals('someuser', second.username)
|
||||
self.assertEquals('foo@bar.com', second.email)
|
||||
|
||||
if first.id == 'testy':
|
||||
testy, someuser = first, second
|
||||
else:
|
||||
testy, someuser = second, first
|
||||
|
||||
self.assertEquals('testy', testy.id)
|
||||
self.assertEquals('testy', testy.username)
|
||||
self.assertEquals('bar@baz.com', testy.email)
|
||||
|
||||
self.assertEquals('someuser', someuser.id)
|
||||
self.assertEquals('someuser', someuser.username)
|
||||
self.assertEquals('foo@bar.com', someuser.email)
|
||||
|
||||
def test_check_group_lookup_args(self):
|
||||
with mock_ldap() as ldap:
|
||||
|
|
Reference in a new issue