Fix unit test.

This commit is contained in:
Antoine Nguyen
2016-05-05 08:13:58 +02:00
parent 74266e64ce
commit aae1adcb4c
2 changed files with 6 additions and 2 deletions
+5
View File
@@ -1,6 +1,7 @@
# coding: utf-8
from django.core.urlresolvers import reverse
from django.test import override_settings
from modoboa.core.models import User
from modoboa.core import tests as core_tests
@@ -154,6 +155,10 @@ class AccountTestCase(ModoTestCase):
)
@override_settings(AUTHENTICATION_BACKENDS=(
'modoboa.lib.authbackends.LDAPBackend',
'modoboa.lib.authbackends.SimpleBackend',
))
class LDAPAccountTestCase(core_tests.LDAPTestCaseMixin, ModoTestCase):
"""Check LDAP related code."""
+1 -2
View File
@@ -58,8 +58,7 @@ class LDAPTestCaseMixin(object):
try:
backend.update_user_password(
username, password, new_password)
except exceptions.InternalError as exp:
print exp
except exceptions.InternalError:
pass
else:
return