mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Merge pull request #20266 from cachedout/tornado_version_detect
Tornado version detect
This commit is contained in:
commit
eef6519830
@ -3,6 +3,7 @@
|
||||
# Import Python Libs
|
||||
import json
|
||||
import time
|
||||
from distutils.version import StrictVersion
|
||||
|
||||
# Import Salt Libs
|
||||
from salt.netapi.rest_tornado import saltnado
|
||||
@ -21,6 +22,7 @@ except ImportError:
|
||||
HAS_TORNADO = False
|
||||
|
||||
try:
|
||||
import zmq
|
||||
from zmq.eventloop.ioloop import ZMQIOLoop
|
||||
HAS_ZMQ_IOLOOP = True
|
||||
except ImportError:
|
||||
@ -29,6 +31,7 @@ except ImportError:
|
||||
|
||||
@skipIf(HAS_TORNADO is False, 'Tornado must be installed to run these tests')
|
||||
@skipIf(HAS_ZMQ_IOLOOP is False, 'PyZMQ version must be >= 14.0.1 to run these tests.')
|
||||
@skipIf(StrictVersion(zmq.__version__) < StrictVersion('14.0.1'), 'PyZMQ must be >= 14.0.1 to run these tests.')
|
||||
class TestSaltAPIHandler(SaltnadoTestCase):
|
||||
def get_app(self):
|
||||
application = tornado.web.Application([('/', saltnado.SaltAPIHandler)], debug=True)
|
||||
|
Loading…
Reference in New Issue
Block a user