From 69c5e1f904a3c964c04dd7c8075975508aa24410 Mon Sep 17 00:00:00 2001 From: Mike Place Date: Fri, 30 Jan 2015 16:01:59 -0700 Subject: [PATCH 1/2] Better detection for minimum pyzmq version --- tests/integration/netapi/rest_tornado/test_app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/integration/netapi/rest_tornado/test_app.py b/tests/integration/netapi/rest_tornado/test_app.py index 63437eac9b..8e6b700cab 100644 --- a/tests/integration/netapi/rest_tornado/test_app.py +++ b/tests/integration/netapi/rest_tornado/test_app.py @@ -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 to run these tests.') class TestSaltAPIHandler(SaltnadoTestCase): def get_app(self): application = tornado.web.Application([('/', saltnado.SaltAPIHandler)], debug=True) From 710bb63103c7c929a7a0b05f7c9fb69daff6007d Mon Sep 17 00:00:00 2001 From: Mike Place Date: Fri, 30 Jan 2015 16:02:56 -0700 Subject: [PATCH 2/2] Typo --- tests/integration/netapi/rest_tornado/test_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/netapi/rest_tornado/test_app.py b/tests/integration/netapi/rest_tornado/test_app.py index 8e6b700cab..149a63b82c 100644 --- a/tests/integration/netapi/rest_tornado/test_app.py +++ b/tests/integration/netapi/rest_tornado/test_app.py @@ -31,7 +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 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)