From 5faff53839906ac65bdc4cb87e0a009395a3ac0e Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Sat, 28 Apr 2018 09:47:57 -0700 Subject: [PATCH] Fix assertTrue(result, _ldap.RES_BIND) to assertEqual() 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 162cedf71ba62b3944d18a27ed206d55e679f966. --- Tests/t_cext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/t_cext.py b/Tests/t_cext.py index ff5fb6c..49ef269 100644 --- a/Tests/t_cext.py +++ b/Tests/t_cext.py @@ -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, []) @@ -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)