Skip to content

Commit 447870d

Browse files
author
stroeder
committed
added TestLdapCExtension.test_anon_rootdse_search()
1 parent 519d213 commit 447870d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Tests/t_cext.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,16 @@ def test_simple_anonymous_bind(self):
160160
self.assertEquals(pmsg, [])
161161
self.assertEquals(ctrls, [])
162162

163-
# see if we can get the rootdse while we're here
163+
def test_anon_rootdse_search(self):
164+
l = self._open_conn(bind=False)
165+
# see if we can get the rootdse with anon search (without prior bind)
164166
m = l.search_ext(
165167
"",
166168
_ldap.SCOPE_BASE,
167169
'(objectClass=*)',
168170
['objectClass', 'namingContexts'],
169171
)
172+
self.assertEqual(type(m), type(0))
170173
result, pmsg, msgid, ctrls = l.result4(m, _ldap.MSG_ALL, self.timeout)
171174
self.assertEquals(result, _ldap.RES_SEARCH_RESULT)
172175
self.assertEquals(pmsg[0][0], "") # rootDSE has no dn

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy