Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes | Static Public Attributes
MoinMoin._tests.ldap_testbase.LdapEnvironment.LDAPTstBase Class Reference

List of all members.

Public Member Functions

def setup_class
def teardown_class

Public Attributes

 ldap_env

Static Public Attributes

 slapd_config = None
 ldif_content = None
 basedn = None
 rootdn = None
 rootpw = None

Detailed Description

Test base class for py.test based tests which need a LDAP server to talk to.

    Inherit your test class from this base class to test LDAP stuff.

Definition at line 230 of file ldap_testbase.py.


Member Function Documentation

Create LDAP server environment, start slapd 

Definition at line 243 of file ldap_testbase.py.

00243 
00244         def setup_class(self):
00245             """ Create LDAP server environment, start slapd """
00246             self.ldap_env = LdapEnvironment(self.basedn, self.rootdn, self.rootpw)
00247             self.ldap_env.create_env(slapd_config=self.slapd_config)
00248             started = self.ldap_env.start_slapd()
00249             if not started:
00250                 py.test.skip("Failed to start %s process, please see your syslog / log files"
00251                              " (and check if stopping apparmor helps, in case you use it)." % SLAPD_EXECUTABLE)
00252             self.ldap_env.load_directory(ldif_content=self.ldif_content)

Stop slapd, remove LDAP server environment 

Definition at line 253 of file ldap_testbase.py.

00253 
00254         def teardown_class(self):
00255             """ Stop slapd, remove LDAP server environment """
00256             self.ldap_env.stop_slapd()
00257             self.ldap_env.destroy_env()


Member Data Documentation

Definition at line 239 of file ldap_testbase.py.

Definition at line 245 of file ldap_testbase.py.

Definition at line 238 of file ldap_testbase.py.

Definition at line 240 of file ldap_testbase.py.

Definition at line 241 of file ldap_testbase.py.

Definition at line 237 of file ldap_testbase.py.


The documentation for this class was generated from the following file: