From a7fcad01ed810ad82f072076b9430259b62df2db Mon Sep 17 00:00:00 2001 From: kakwa Date: Wed, 17 Jun 2015 00:06:30 +0200 Subject: [PATCH] small reorganization --- tests/test_BackendLdap.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/test_BackendLdap.py b/tests/test_BackendLdap.py index a80147b..1abf00a 100644 --- a/tests/test_BackendLdap.py +++ b/tests/test_BackendLdap.py @@ -43,6 +43,14 @@ class TestError(object): inv = Backend(cfg, cherrypy.log, 'ldap', attr, 'uid') return True +# def testConnectSSLNoCheck(self): +# cfg2 = cfg.copy() +# cfg2['uri'] = 'ldaps://ldap.ldapcherry.org:637' +# cfg2['checkcert'] = 'off' +# inv = Backend(cfg2, cherrypy.log, 'ldap', attr, 'uid') +# ldap = inv._connect() +# ldap.simple_bind_s(inv.binddn, inv.bindpassword) + def testConnect(self): inv = Backend(cfg, cherrypy.log, 'ldap', attr, 'uid') ldap = inv._connect() @@ -83,14 +91,6 @@ class TestError(object): except ldap.SERVER_DOWN as e: assert e[0]['info'] == 'TLS: hostname does not match CN in peer certificate' -# def testConnectSSLNoCheck(self): -# cfg2 = cfg.copy() -# cfg2['uri'] = 'ldaps://ldap.ldapcherry.org:637' -# cfg2['checkcert'] = 'off' -# inv = Backend(cfg2, cherrypy.log, 'ldap', attr, 'uid') -# ldap = inv._connect() -# ldap.simple_bind_s(inv.binddn, inv.bindpassword) - def testAuthSuccess(self): inv = Backend(cfg, cherrypy.log, 'ldap', attr, 'uid') return True