Try to fix unit tests.

see #870
This commit is contained in:
Antoine Nguyen
2016-05-03 19:15:38 +02:00
parent 88b472f78e
commit cd49628650
2 changed files with 3 additions and 14 deletions
+3 -3
View File
@@ -69,7 +69,7 @@ class LDAPAuthenticationTestCase(ModoTestCase):
self.client.logout()
parameters.save_admin("LDAP_BIND_DN", "cn=admin,dc=example,dc=com")
parameters.save_admin("LDAP_BIND_PASSWORD", "test")
parameters.save_admin("LDAP_SEARCH_BASE", "dc=example,dc=com")
parameters.save_admin("LDAP_SEARCH_BASE", "ou=usersdc=example,dc=com")
username = "testuser@example.com"
self.assertTrue(self.client.login(username=username, password="test"))
self.check_created_user(username)
@@ -79,8 +79,8 @@ class LDAPAuthenticationTestCase(ModoTestCase):
self.client.logout()
parameters.save_admin("LDAP_AUTH_METHOD", "directbind")
parameters.save_admin(
"LDAP_USER_DN_TEMPLATE", "%(user)s,dc=example,dc=com")
username = "testuser2@example.com"
"LDAP_USER_DN_TEMPLATE", "%(user)s,ou=users,dc=example,dc=com")
username = "testuser"
self.assertTrue(self.client.login(username=username, password="test"))
self.check_created_user(username)
-11
View File
@@ -40,14 +40,3 @@ givenName: Test
sn: User
mail: testuser@example.com
userPassword: {SSHA}AIzygLSXlArhAMzddUriXQxf7UlkqopP
dn: mail=testuser2@example.com,ou=users,dc=example,dc=com
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
objectClass: top
cn: testuser2
givenName: Test
sn: User
mail: testuser2@example.com
userPassword: {SSHA}AIzygLSXlArhAMzddUriXQxf7UlkqopP