Wrap mock import to avoid ImportErrors

This commit is contained in:
Colton Myers 2013-03-21 16:48:18 -06:00
parent f69e305df4
commit d3314e231b

View File

@ -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