Update the Mock class to support * imports

The Mock class in the FAQs currently does not support `from module import *` type imports. As described here http://stackoverflow.com/questions/11877571/how-to-mock-so-that-from-x-import-works the solution is to add `__all__ = []` to the class definition.
refactor-builder
Martin Fitzpatrick 2014-02-10 00:31:18 +00:00
parent 7bb414909d
commit cbb083051f
1 changed files with 3 additions and 0 deletions

View File

@ -39,6 +39,9 @@ You can mock out the imports for these modules in your conf.py with the followin
import sys
class Mock(object):
__all__ = []
def __init__(self, *args, **kwargs):
pass