From 83763d908bb443f3284d72bf9f43487fb112c175 Mon Sep 17 00:00:00 2001 From: pyldap contributors Date: Thu, 23 Nov 2017 23:26:05 +0100 Subject: [PATCH] Tests: Add a test for whoami after unbind --- Tests/t_cext.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Tests/t_cext.py b/Tests/t_cext.py index 3cbdbe7..cd171b6 100644 --- a/Tests/t_cext.py +++ b/Tests/t_cext.py @@ -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