1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-11-22 17:34:21 +01:00

trying to add mock cherrypy module for API doc

This commit is contained in:
kakwa 2015-07-19 23:56:13 +02:00
parent 56208d36a0
commit 0bbad88097

View File

@ -41,7 +41,7 @@ source_suffix = '.rst'
master_doc = 'index' master_doc = 'index'
# General information about the project. # General information about the project.
project = u'LdapCherry - Performance Test Framework' project = u'LdapCherry - Directory Management Interface'
copyright = u'2014, Pierre-Francois Carpentier' copyright = u'2014, Pierre-Francois Carpentier'
# The version info for the project you're documenting, acts as replacement for # 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. # Output file base name for HTML help builder.
htmlhelp_basename = 'LdapCherry-docs' 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