Browse files

fix use_tls flag

  • Loading branch information...
1 parent e5c62a3 commit d1f800739f4335b16bbc24c1490c288255d5342e @mcdonc committed Feb 26, 2012
Showing with 11 additions and 1 deletion.
  1. +6 −0 CHANGES.txt
  2. +1 −1 ldappool/__init__.py
  3. +4 −0 ldappool/tests/test_ldappool.py
View
6 CHANGES.txt
@@ -0,0 +1,6 @@
+Next release
+------------
+
+- Fix ``use_tls`` flag to ConnectionManager; it previously was always set
+ ``False`` no matter what was passed.
+
View
2 ldappool/__init__.py
@@ -129,7 +129,7 @@ def __init__(self, uri, bind=None, passwd=None, size=10, retry_max=3,
self.bind = bind
self.passwd = passwd
self._pool_lock = RLock()
- self.use_tls = False
+ self.use_tls = use_tls
self.timeout = timeout
self.connector_cls = connector_cls
self.use_pool = use_pool
View
4 ldappool/tests/test_ldappool.py
@@ -118,6 +118,10 @@ def run(self):
class TestLDAPSQLAuth(unittest.TestCase):
+ def test_ctor_args(self):
+ pool = ConnectionManager('ldap://localhost', use_tls=True)
+ self.assertEqual(pool.use_tls, True)
+
def test_pool(self):
dn = 'uid=adminuser,ou=logins,dc=mozilla'
passwd = 'adminuser'

0 comments on commit d1f8007

Please sign in to comment.