Permalink
Browse files

Try to fix unit tests.

see #870
  • Loading branch information...
tonioo committed May 3, 2016
1 parent 88b472f commit cd496286504c17eab34463efe5a7839ec8e05207
Showing with 3 additions and 14 deletions.
  1. +3 −3 modoboa/core/tests.py
  2. +0 −11 test_data/base.ldif
View
@@ -69,7 +69,7 @@ def test_searchbind_authentication(self):
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 @@ def test_directbind_authentication(self):
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)
View
@@ -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

0 comments on commit cd49628

Please sign in to comment.