Skip to content

Commit 1bc1c6c

Browse files
author
stroeder
committed
added test for LDAPObject.sasl_external_bind_s()
1 parent 4ec2378 commit 1bc1c6c

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

CHANGES

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Lib/
88
to LDAPObject.sasl_interactive_bind_s()
99

1010
Tests/
11-
*
11+
* added test for LDAPObject.sasl_external_bind_s()
1212

1313
----------------------------------------------------------------
1414
Released 2.4.42 2017-09-04
@@ -1488,4 +1488,4 @@ Released 2.0.0pre02 2002-02-01
14881488
----------------------------------------------------------------
14891489
Released 1.10alpha3 2000-09-19
14901490

1491-
$Id: CHANGES,v 1.460 2017/09/04 14:59:12 stroeder Exp $
1491+
$Id: CHANGES,v 1.461 2017/09/04 14:59:57 stroeder Exp $

Tests/t_ldapobject.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
See https://www.python-ldap.org/ for details.
66
7-
$Id: t_ldapobject.py,v 1.9 2017/09/04 07:47:29 stroeder Exp $
7+
$Id: t_ldapobject.py,v 1.10 2017/09/04 14:59:57 stroeder Exp $
88
"""
99

1010
import os
@@ -175,6 +175,15 @@ def test_invalid_credentials(self):
175175
else:
176176
self.fail("expected INVALID_CREDENTIALS, got %r" % r)
177177

178+
def test_sasl_extenal_bind_s(self):
179+
l = self.ldap_object_class(self.server.ldapi_uri)
180+
l.sasl_external_bind_s()
181+
self.assertEqual(l.whoami_s(), 'dn:'+self.server.root_dn.lower())
182+
authz_id = 'dn:cn=Foo2,%s' % (self.server.suffix)
183+
l = self.ldap_object_class(self.server.ldapi_uri)
184+
l.sasl_external_bind_s(authz_id=authz_id)
185+
self.assertEqual(l.whoami_s(), authz_id.lower())
186+
178187

179188
class Test02_ReconnectLDAPObject(Test01_SimpleLDAPObject):
180189
"""

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