mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge branch 'develop' of https://github.com/saltstack/salt into develop
This commit is contained in:
commit
77f54af75e
@ -5,15 +5,20 @@ Test the django module
|
||||
import sys
|
||||
|
||||
# Import Salt libs
|
||||
from saltunittest import TestLoader, TextTestRunner
|
||||
from saltunittest import TestLoader, TextTestRunner, skipIf
|
||||
import integration
|
||||
from integration import TestDaemon
|
||||
from salt.modules import django
|
||||
django.__salt__ = {}
|
||||
|
||||
from mock import MagicMock, patch
|
||||
try:
|
||||
from mock import MagicMock, patch
|
||||
has_mock = True
|
||||
except ImportError:
|
||||
has_mock = False
|
||||
|
||||
|
||||
@skipIf(has_mock is False, "mock python module is unavailable")
|
||||
class DjangoModuleTest(integration.ModuleCase):
|
||||
'''
|
||||
Test the django module
|
||||
|
@ -18,8 +18,7 @@ if sys.version_info[0:2] < (2, 7):
|
||||
TestCase, expectedFailure, \
|
||||
TestSuite, skipIf
|
||||
except ImportError:
|
||||
print("You need to install unittest2 to run the salt tests")
|
||||
sys.exit(1)
|
||||
raise SystemExit("You need to install unittest2 to run the salt tests")
|
||||
else:
|
||||
from unittest import TestLoader, TextTestRunner,\
|
||||
TestCase, expectedFailure, \
|
||||
|
Loading…
Reference in New Issue
Block a user