Back to index

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

List of all members.

Classes

class  Config

Public Member Functions

def testMoinLDAPLogin

Static Public Attributes

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

Detailed Description

Definition at line 44 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 58 of file test_ldap_login.py.

00058 
00059     def testMoinLDAPLogin(self):
00060         """ Just try accessing the LDAP server and see if usera and userb are in LDAP. """
00061 
00062         handle_auth = self.request.handle_auth
00063 
00064         # tests that must not authenticate:
00065         u = handle_login(self.request, None, username='', password='')
00066         assert u is None
00067         u = handle_login(self.request, None, username='usera', password='')
00068         assert u is None
00069         u = handle_login(self.request, None, username='usera', password='userawrong')
00070         assert u is None
00071         u = handle_login(self.request, None, username='userawrong', password='usera')
00072         assert u is None
00073 
00074         # tests that must authenticate:
00075         u1 = handle_login(self.request, None, username='usera', password='usera')
00076         assert u1 is not None
00077         assert u1.valid
00078 
00079         u2 = handle_login(self.request, None, username='userb', password='userb')
00080         assert u2 is not None
00081         assert u2.valid
00082 
00083         # check if usera and userb have different ids:
00084         assert u1.id != u2.id
00085 

Here is the call graph for this function:


Member Data Documentation

Definition at line 45 of file test_ldap_login.py.

Definition at line 49 of file test_ldap_login.py.

Definition at line 46 of file test_ldap_login.py.

Definition at line 47 of file test_ldap_login.py.

Definition at line 48 of file test_ldap_login.py.


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