Back to index

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

List of all members.

Classes

class  Config

Public Member Functions

def teardown_class
def testBugDefaultPasswd

Static Public Attributes

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

Detailed Description

Definition at line 86 of file test_ldap_login.py.


Member Function Documentation

Stop slapd, remove LDAP server environment 

Definition at line 102 of file test_ldap_login.py.

00102 
00103     def teardown_class(self):
00104         """ Stop slapd, remove LDAP server environment """
00105         #self.ldap_env.stop_slapd()  # it is already stopped
00106         self.ldap_env.destroy_env()

Login via LDAP (this creates user profile and up to 1.7.0rc1 it put
    a default password there), then try logging in via moin login using
    that default password or an empty password.

Definition at line 107 of file test_ldap_login.py.

00107 
00108     def testBugDefaultPasswd(self):
00109         """ Login via LDAP (this creates user profile and up to 1.7.0rc1 it put
00110             a default password there), then try logging in via moin login using
00111             that default password or an empty password.
00112         """
00113 
00114         nuke_user(self.request, u'usera')
00115 
00116         # do a LDAPAuth login (as a side effect, this autocreates the user profile):
00117         u1 = handle_login(self.request, None, username='usera', password='usera')
00118         assert u1 is not None
00119         assert u1.valid
00120 
00121         # now we kill the LDAP server:
00122         #self.ldap_env.slapd.stop()
00123 
00124         # now try a MoinAuth login:
00125         # try the default password that worked in 1.7 up to rc1:
00126         u2 = handle_login(self.request, None, username='usera', password='{SHA}NotStored')
00127         assert u2 is None
00128 
00129         # try using no password:
00130         u2 = handle_login(self.request, None, username='usera', password='')
00131         assert u2 is None
00132 
00133         # try using wrong password:
00134         u2 = handle_login(self.request, None, username='usera', password='wrong')
00135         assert u2 is None
00136 

Here is the call graph for this function:


Member Data Documentation

Definition at line 87 of file test_ldap_login.py.

Definition at line 91 of file test_ldap_login.py.

Definition at line 88 of file test_ldap_login.py.

Definition at line 89 of file test_ldap_login.py.

Definition at line 90 of file test_ldap_login.py.


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