Skip to content

Commit

Permalink
Fix assertTrue(result, _ldap.RES_BIND) to assertEqual()
Browse files Browse the repository at this point in the history
Fix a pattern where assertTrue(result, _ldap.RES_BIND) was mistakenly
used in place of self.assertEqual(result, _ldap.RES_BIND).

Mistakes introduced in commit 162cedf.
  • Loading branch information
Jon Dufresne authored and Petr Viktorin committed May 25, 2018
1 parent f23f790 commit 5faff53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tests/t_cext.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def test_simple_anonymous_bind(self):
m = l.simple_bind("", "")
self.assertEqual(type(m), type(0))
result, pmsg, msgid, ctrls = l.result4(m, _ldap.MSG_ALL, self.timeout)
self.assertTrue(result, _ldap.RES_BIND)
self.assertEqual(result, _ldap.RES_BIND)
self.assertEqual(msgid, m)
self.assertEqual(pmsg, [])
self.assertEqual(ctrls, [])
Expand Down Expand Up @@ -629,7 +629,7 @@ def test_whoami_anonymous(self):
# Anonymous bind
m = l.simple_bind("", "")
result, pmsg, msgid, ctrls = l.result4(m, _ldap.MSG_ALL, self.timeout)
self.assertTrue(result, _ldap.RES_BIND)
self.assertEqual(result, _ldap.RES_BIND)
# check with Who Am I? extended operation
r = l.whoami_s()
self.assertEqual("", r)
Expand Down

0 comments on commit 5faff53

Please sign in to comment.