Skip to content

Commit

Permalink
added TestLdapCExtension.test_errno107()
Browse files Browse the repository at this point in the history
  • Loading branch information
stroeder committed Apr 26, 2017
1 parent 2636154 commit c59ef53
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Tests/t_cext.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,18 @@ def test_cancel(self):
if not self._require_attr(l, 'cancel'): # FEATURE_CANCEL
return

def test_errno107(self):
l = _ldap.initialize('ldap://127.0.0.1:42')
try:
m = l.simple_bind("", "")
result, pmsg, msgid, ctrls = l.result4(m, _ldap.MSG_ALL, self.timeout)
except _ldap.SERVER_DOWN, ldap_err:
errno = ldap_err.args[0]['errno']
if errno!=107:
self.fail("expected errno=107, got %d" % errno)
else:
self.fail("expected SERVER_DOWN, got %r" % r)


if __name__ == '__main__':
unittest.main()

0 comments on commit c59ef53

Please sign in to comment.