Skip to content

Commit

Permalink
added new stand-alone module slapdtest (formerly Tests/slapd.py)
Browse files Browse the repository at this point in the history
  • Loading branch information
stroeder committed Apr 26, 2017
1 parent e6a5501 commit 2636154
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
9 changes: 6 additions & 3 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ Changes since 2.4.35:
Lib/
* gracefully handle KeyError in LDAPObject._ldap_call() when
using errno
* added new stand-alone module slapdtest (formerly Tests/slapd.py)
for general use (still experimental)

Tests/
* re-factored slapd.py, t_cext.py and t_search.py
* re-factored t_cext.py and t_search.py
* set env var LDAPNOINIT=1 in t_cext.py and t_search.py to avoid
interference with locally installed .ldaprc or ldap.conf
* by default back-mdb is now used for slapd-based tests
which requires fairly recent OpenLDAP builds
which requires fairly recent OpenLDAP builds but implements
full feature set
* env vars can be set for slapd.py to tweak path names
of executables, temporary and schema data to be used
* new class SlapdTestCase
Expand Down Expand Up @@ -1393,4 +1396,4 @@ Released 2.0.0pre02 2002-02-01
----------------------------------------------------------------
Released 1.10alpha3 2000-09-19

$Id: CHANGES,v 1.429 2017/04/26 14:54:14 stroeder Exp $
$Id: CHANGES,v 1.430 2017/04/26 16:52:50 stroeder Exp $
10 changes: 8 additions & 2 deletions Tests/slapd.py → Lib/slapdtest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
"""
Utilities for starting up a test slapd server
and talking to it with ldapsearch/ldapadd.
slapdtest - module for spawning test instances of OpenLDAP's slapd server
See http://www.python-ldap.org/ for details.
\$Id: slapdtest.py,v 1.1 2017/04/26 16:52:50 stroeder Exp $
Python compability note:
This module only works with Python 2.7.x since
"""

import os
Expand Down
2 changes: 0 additions & 2 deletions Tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,3 @@
import t_ldif
import t_search
import t_ldap_schema_subentry

import slapd
2 changes: 1 addition & 1 deletion Tests/t_cext.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import os
import unittest
from Tests.slapd import SlapdTestCase
from slapdtest import SlapdTestCase

# Switch off processing .ldaprc or ldap.conf before importing _ldap
os.environ['LDAPNOINIT'] = '1'
Expand Down
2 changes: 1 addition & 1 deletion Tests/t_search.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
import unittest
from Tests.slapd import SlapdTestCase
from slapdtest import SlapdTestCase

# Switch off processing .ldaprc or ldap.conf before importing _ldap
os.environ['LDAPNOINIT'] = '1'
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
See http://www.python-ldap.org/ for details.
$Id: setup.py,v 1.78 2017/02/14 21:38:13 stroeder Exp $
$Id: setup.py,v 1.79 2017/04/26 16:52:50 stroeder Exp $
"""

has_setuptools = False
Expand Down Expand Up @@ -149,6 +149,7 @@ class OpenLDAP2:
'ldif',
'dsml',
'ldap',
'slapdtest',
'ldap.async',
'ldap.controls',
'ldap.controls.deref',
Expand Down

0 comments on commit 2636154

Please sign in to comment.