Back to index

moin  1.9.0~rc2
Public Member Functions | Static Public Attributes
test_ldap_login.TestLDAPServer Class Reference
Inheritance diagram for test_ldap_login.TestLDAPServer:
Inheritance graph
[legend]
Collaboration diagram for test_ldap_login.TestLDAPServer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def testLDAP

Static Public Attributes

 basedn = BASEDN
 rootdn = ROOTDN
 rootpw = ROOTPW
 slapd_config = SLAPD_CONFIG
 ldif_content = LDIF_CONTENT

Detailed Description

Definition at line 25 of file test_ldap_login.py.


Member Function Documentation

Just try accessing the LDAP server and see if usera and userb are in LDAP. 

Definition at line 32 of file test_ldap_login.py.

00032 
00033     def testLDAP(self):
00034         """ Just try accessing the LDAP server and see if usera and userb are in LDAP. """
00035         server_uri = self.ldap_env.slapd.url
00036         base_dn = self.ldap_env.basedn
00037         lo = ldap.initialize(server_uri)
00038         ldap.set_option(ldap.OPT_PROTOCOL_VERSION, ldap.VERSION3) # ldap v2 is outdated
00039         lo.simple_bind_s('', '')
00040         lusers = lo.search_st(base_dn, ldap.SCOPE_SUBTREE, '(uid=*)')
00041         uids = [ldap_dict['uid'][0] for dn, ldap_dict in lusers]
00042         assert 'usera' in uids
00043         assert 'userb' in uids


Member Data Documentation

Definition at line 26 of file test_ldap_login.py.

Definition at line 30 of file test_ldap_login.py.

Definition at line 27 of file test_ldap_login.py.

Definition at line 28 of file test_ldap_login.py.

Definition at line 29 of file test_ldap_login.py.


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