Skip to content
Browse files

test: skip ldapsync if it is not available

  • Loading branch information
jeromelebleu authored and tonioo committed Dec 29, 2019
1 parent c0aedd0 commit db12a4aeef2bc64757e1db7cc12890eae6e959f2
Showing with 10 additions and 4 deletions.
  1. +3 −3 modoboa/ldapsync/
  2. +7 −1 test_project/test_project/
@@ -4,16 +4,16 @@

from unittest import skipIf

import ldap

from django.utils import six
from django.utils.encoding import force_bytes, force_str

from modoboa.core import factories as core_factories
from modoboa.lib.tests import NO_LDAP, ModoTestCase
from modoboa.parameters import tools as param_tools

from . import lib
if not NO_LDAP:
import ldap
from . import lib

@skipIf(NO_LDAP, "No ldap module installed")
@@ -70,10 +70,16 @@
# Modoboa extensions here.

import ldap # noqa: F401
except ImportError:
MODOBOA_APPS += ("modoboa.ldapsync",)


AUTH_USER_MODEL = "core.User"

0 comments on commit db12a4a

Please sign in to comment.
You can’t perform that action at this time.