tests: Ignore http tests if ws4py is missing

This commit is contained in:
Stein Magnus Jodal 2012-12-01 17:24:34 +01:00
parent ac6cecd2f8
commit 3f8b5affe0

View File

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