mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Configure importing Mock to handle 'total' method from psutils properly
This commit is contained in:
parent
9c057d0266
commit
a56ae4e8f5
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue