Fix ordering in LDAP test

This commit is contained in:
Joseph Schorr 2017-02-17 18:19:35 -05:00
parent bb20422260
commit a17b637032

View file

@ -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: