Add some tests for using the ldap2 Backend.

Fix a logic problem in ldap2:get_schema() for determining if it
can fetch the schema or not. Normally we only want to do this for servers
but if you pass in your own connection it will use that.
This commit is contained in:
Rob Crittenden
2010-09-09 16:24:12 -04:00
parent da8f51373a
commit 5b3d0f568a
2 changed files with 119 additions and 1 deletions

View File

@@ -121,7 +121,7 @@ def get_schema(url, conn=None):
tmpdir = None
has_conn = conn is not None
if (not api.env.in_server or api.env.context not in ['lite', 'server']
if ((not api.env.in_server or api.env.context not in ['lite', 'server'])
and conn is None):
# The schema is only needed on the server side
return None