Commits

Andy Mikhailenko committed ce61267

Mock pymongo/bson to build the documentation in environments without MongoDB

  • Participants
  • Parent commits deef172

Comments (0)

Files changed (3)

File docs/conf.py

 import sys, os
 import datetime
 
+import mock
+
+
+MOCK_MODULES = ['pymongo', 'bson']
+for mod_name in MOCK_MODULES:
+    sys.modules[mod_name] = mock.MagicMock()
+
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
 # documentation root, use os.path.abspath to make it absolute, like shown here.

File requirements/devel.txt

 -r basic.txt
+-r docs.txt
 
-Sphinx == 1.1.2
 coverage == 3.5.1
 pep8
 pytest >= 2.2.0

File requirements/docs.txt

+Sphinx == 1.1.2
+Mock == 1.0.1