From 5b4efe8efb59d9cde0b6df7a91ffbdd73fabdb1c Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Sat, 12 Aug 2017 17:18:56 +0200 Subject: [PATCH] [doc] try this mock magic thingy for ldap --- doc/conf.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/conf.py b/doc/conf.py index b51c4a56..aabd3ee0 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -21,6 +21,18 @@ import sys sys.path.insert(0, os.path.abspath('..')) +import sys +from mock import Mock as MagicMock + +class Mock(MagicMock): + @classmethod + def __getattr__(cls, name): + return MagicMock() + +MOCK_MODULES = ['ldap'] +sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) + + # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here.