mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Configure importing Mock to handle 'total' method from psutils properly
This commit is contained in:
parent
9c057d0266
commit
a56ae4e8f5
@ -141,7 +141,11 @@ MOCK_MODULES = [
|
||||
]
|
||||
|
||||
for mod_name in MOCK_MODULES:
|
||||
sys.modules[mod_name] = Mock()
|
||||
if mod_name == 'psutil':
|
||||
mock = Mock(mapping={'total': 0}) # Otherwise it will crash Sphinx
|
||||
else:
|
||||
mock = Mock()
|
||||
sys.modules[mod_name] = mock
|
||||
|
||||
def mock_decorator_with_params(*oargs, **okwargs):
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user