From 447870d4274169b7d5ddd75eb7fca74b3e890600 Mon Sep 17 00:00:00 2001 From: stroeder Date: Wed, 26 Apr 2017 20:42:25 +0000 Subject: [PATCH] added TestLdapCExtension.test_anon_rootdse_search() --- Tests/t_cext.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Tests/t_cext.py b/Tests/t_cext.py index 51c446a..f3d6283 100644 --- a/Tests/t_cext.py +++ b/Tests/t_cext.py @@ -160,13 +160,16 @@ def test_simple_anonymous_bind(self): self.assertEquals(pmsg, []) self.assertEquals(ctrls, []) - # see if we can get the rootdse while we're here + def test_anon_rootdse_search(self): + l = self._open_conn(bind=False) + # see if we can get the rootdse with anon search (without prior bind) m = l.search_ext( "", _ldap.SCOPE_BASE, '(objectClass=*)', ['objectClass', 'namingContexts'], ) + self.assertEqual(type(m), type(0)) result, pmsg, msgid, ctrls = l.result4(m, _ldap.MSG_ALL, self.timeout) self.assertEquals(result, _ldap.RES_SEARCH_RESULT) self.assertEquals(pmsg[0][0], "") # rootDSE has no dn