tldap.test.slapd¶
Utilities for starting up a test slapd server and talking to it with ldapsearch/ldapadd.
-
class
tldap.test.slapd.
Slapd
[source]¶ Controller class for a slapd instance, OpenLDAP’s server.
This class creates a temporary data store for slapd, runs it on a private port, and initialises it with a top-level dc and the root user.
When a reference to an instance of this class is lost, the slapd server is shut down.
-
classmethod
check_paths
()[source]¶ Checks that the configured executable paths look valid. If they don’t, then logs warning messages (not errors).
-
configure
(cfg)[source]¶ Appends slapd.conf configuration lines to cfg. Also re-initializes any backing storage. Feel free to subclass and override this method.
-
ldapadd
(ldif, extra_args=[])[source]¶ Runs ldapadd on this slapd instance, passing it the ldif content
-
restart
()[source]¶ Restarts the slapd server; ERASING previous content. Starts the server even it if isn’t already running.
-
classmethod