diff --git a/modoboa/admin/tests/test_account.py b/modoboa/admin/tests/test_account.py index 2b15f2d64..2c47ea9f4 100644 --- a/modoboa/admin/tests/test_account.py +++ b/modoboa/admin/tests/test_account.py @@ -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.""" diff --git a/modoboa/core/tests.py b/modoboa/core/tests.py index 524dbf615..cc27441e4 100644 --- a/modoboa/core/tests.py +++ b/modoboa/core/tests.py @@ -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