mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-26 03:04:30 +01:00
trying to add mock cherrypy module for API doc
This commit is contained in:
parent
56208d36a0
commit
0bbad88097
14
docs/conf.py
14
docs/conf.py
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user