mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-25 10:44:30 +01:00
small reorganization
This commit is contained in:
parent
0d766d3303
commit
a7fcad01ed
@ -43,6 +43,14 @@ class TestError(object):
|
|||||||
inv = Backend(cfg, cherrypy.log, 'ldap', attr, 'uid')
|
inv = Backend(cfg, cherrypy.log, 'ldap', attr, 'uid')
|
||||||
return True
|
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):
|
def testConnect(self):
|
||||||
inv = Backend(cfg, cherrypy.log, 'ldap', attr, 'uid')
|
inv = Backend(cfg, cherrypy.log, 'ldap', attr, 'uid')
|
||||||
ldap = inv._connect()
|
ldap = inv._connect()
|
||||||
@ -83,14 +91,6 @@ class TestError(object):
|
|||||||
except ldap.SERVER_DOWN as e:
|
except ldap.SERVER_DOWN as e:
|
||||||
assert e[0]['info'] == 'TLS: hostname does not match CN in peer certificate'
|
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):
|
def testAuthSuccess(self):
|
||||||
inv = Backend(cfg, cherrypy.log, 'ldap', attr, 'uid')
|
inv = Backend(cfg, cherrypy.log, 'ldap', attr, 'uid')
|
||||||
return True
|
return True
|
||||||
|
Loading…
Reference in New Issue
Block a user