mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Wrap mock import to avoid ImportErrors
This commit is contained in:
parent
f69e305df4
commit
d3314e231b
@ -1,4 +1,10 @@
|
||||
from mock import Mock, patch
|
||||
|
||||
try:
|
||||
from mock import Mock, patch
|
||||
has_mock = True
|
||||
except ImportError:
|
||||
has_mock = False
|
||||
patch = lambda x: lambda: None
|
||||
|
||||
from saltunittest import TestCase, TestLoader, TextTestRunner
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user