Skip to content

Commit

Permalink
potential fix of Readthedocs by mocking pycurl
Browse files Browse the repository at this point in the history
  • Loading branch information
KissPeter committed Mar 15, 2020
1 parent ae60cc6 commit 9687c86
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,25 @@
import os
import sys

from mock import Mock as MagicMock

path = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir))
sys.path.insert(0, path)


class Mock(MagicMock):
@classmethod
def __getattr__(cls, name):
return Mock()

@classmethod
def __getitem__(cls, name):
return Mock()


MOCK_MODULES = ['pycurl']
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)

project = 'APIfuzzer'
version = '0.9'
master_doc = "index"
Expand Down

0 comments on commit 9687c86

Please sign in to comment.