From 3f8b5affe0267a348ae27c2c660251d2d547a4ab Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sat, 1 Dec 2012 17:24:34 +0100 Subject: [PATCH] tests: Ignore http tests if ws4py is missing --- tests/frontends/http/events_test.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/frontends/http/events_test.py b/tests/frontends/http/events_test.py index 631802c4..5c064e93 100644 --- a/tests/frontends/http/events_test.py +++ b/tests/frontends/http/events_test.py @@ -4,6 +4,10 @@ try: import cherrypy except ImportError: cherrypy = False +try: + import ws4py +except ImportError: + ws4py = False import mock from mopidy.exceptions import OptionalDependencyError @@ -16,6 +20,7 @@ from tests import unittest @unittest.skipUnless(cherrypy, 'cherrypy not found') +@unittest.skipUnless(ws4py, 'ws4py not found') @mock.patch('cherrypy.engine.publish') class HttpEventsTest(unittest.TestCase): def setUp(self):