Skip to content

Commit 5faff53

Browse files
jdufresneencukou
authored andcommitted
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 162cedf.
1 parent f23f790 commit 5faff53

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Tests/t_cext.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def test_simple_anonymous_bind(self):
234234
m = l.simple_bind("", "")
235235
self.assertEqual(type(m), type(0))
236236
result, pmsg, msgid, ctrls = l.result4(m, _ldap.MSG_ALL, self.timeout)
237-
self.assertTrue(result, _ldap.RES_BIND)
237+
self.assertEqual(result, _ldap.RES_BIND)
238238
self.assertEqual(msgid, m)
239239
self.assertEqual(pmsg, [])
240240
self.assertEqual(ctrls, [])
@@ -629,7 +629,7 @@ def test_whoami_anonymous(self):
629629
# Anonymous bind
630630
m = l.simple_bind("", "")
631631
result, pmsg, msgid, ctrls = l.result4(m, _ldap.MSG_ALL, self.timeout)
632-
self.assertTrue(result, _ldap.RES_BIND)
632+
self.assertEqual(result, _ldap.RES_BIND)
633633
# check with Who Am I? extended operation
634634
r = l.whoami_s()
635635
self.assertEqual("", r)

0 commit comments

Comments
 (0)