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.