From 0bbad880978e2675eeac4d642a9983084f12615d Mon Sep 17 00:00:00 2001 From: kakwa Date: Sun, 19 Jul 2015 23:56:13 +0200 Subject: [PATCH] trying to add mock cherrypy module for API doc --- docs/conf.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 2531003..de797a6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -41,7 +41,7 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'LdapCherry - Performance Test Framework' +project = u'LdapCherry - Directory Management Interface' copyright = u'2014, Pierre-Francois Carpentier' # The version info for the project you're documenting, acts as replacement for @@ -165,3 +165,15 @@ html_file_suffix = ".html" # Output file base name for HTML help builder. htmlhelp_basename = 'LdapCherry-docs' +try: + from unittest.mock import MagicMock + + class Mock(MagicMock): + @classmethod + def __getattr__(cls, name): + return Mock() + + MOCK_MODULES = ['cherrypy'] + sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) +except Exception as e: + pass