Skip to content

Commit

Permalink
Tests: Add a test for whoami after unbind
Browse files Browse the repository at this point in the history
  • Loading branch information
pyldap contributors authored and Petr Viktorin committed Nov 24, 2017
1 parent 2a30680 commit 83763d9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Tests/t_cext.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,13 @@ def test_whoami_anonymous(self):
r = l.whoami_s()
self.assertEqual("", r)

def test_whoami_after_unbind(self):
# https://github.com/pyldap/pyldap/issues/29
l = self._open_conn(bind=True)
l.unbind_ext()
with self.assertRaises(_ldap.LDAPError):
l.whoami_s()

def test_passwd(self):
l = self._open_conn()
# first, create a user to change password on
Expand Down

0 comments on commit 83763d9

Please sign in to comment.