python/samba/tests: make sure samba.tests can be imported without SamDB
commit6de9d878b5f63e5b5ac7f8b5dd2ca50e4ba8fa1a
authorAlexander Bokovoy <ab@samba.org>
Sat, 21 Jul 2018 09:05:15 +0000 (21 12:05 +0300)
committerGünther Deschner <gd@samba.org>
Mon, 23 Jul 2018 17:36:56 +0000 (23 19:36 +0200)
tree2b53ab392654d1dc367a03ff4296c1b8a0fc2fe1
parent1faaeb00b5b8217c7a2cb145673ceba847b94cf2
python/samba/tests: make sure samba.tests can be imported without SamDB

We are using samba.tests Python module __init__.py file as a catch-all
for all types of helpers. Some of these helpers are only usable with
Samba AD DC targets.

When SamDB is not available in a non-Samba AD DC target, provide a
dummy replacement that simply returns None. This allows to complete
initialization for non-Samba AD DC target tests which do not use
connect_samdb() helper.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13542

Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Mon Jul 23 19:36:56 CEST 2018 on sn-devel-144
python/samba/tests/__init__.py