test: skip ldapsync if it is not available

This commit is contained in:
Jérôme Lebleu
2020-01-07 09:34:39 +01:00
committed by Antoine Nguyen
parent c0aedd04d5
commit db12a4aeef
2 changed files with 10 additions and 4 deletions
+7 -1
View File
@@ -70,10 +70,16 @@ MODOBOA_APPS = (
"modoboa.limits",
"modoboa.parameters",
"modoboa.dnstools",
"modoboa.ldapsync",
# Modoboa extensions here.
)
try:
import ldap # noqa: F401
except ImportError:
pass
else:
MODOBOA_APPS += ("modoboa.ldapsync",)
INSTALLED_APPS += MODOBOA_APPS
AUTH_USER_MODEL = "core.User"