mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Fix unit test.
This commit is contained in:
@@ -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."""
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user