mopidy/tests/test_exceptions.py
Thomas Adamcik d650c0ba14 audio: Split out ouput handling from audio actor
This also lays some basic ground work for handling multiple outputs.
2014-08-03 23:57:22 +02:00

38 lines
1.2 KiB
Python

from __future__ import unicode_literals
import unittest
from mopidy import exceptions
class ExceptionsTest(unittest.TestCase):
def test_exception_can_include_message_string(self):
exc = exceptions.MopidyException('foo')
self.assertEqual(exc.message, 'foo')
self.assertEqual(str(exc), 'foo')
def test_backend_error_is_a_mopidy_exception(self):
self.assert_(issubclass(
exceptions.BackendError, exceptions.MopidyException))
def test_extension_error_is_a_mopidy_exception(self):
self.assert_(issubclass(
exceptions.ExtensionError, exceptions.MopidyException))
def test_frontend_error_is_a_mopidy_exception(self):
self.assert_(issubclass(
exceptions.FrontendError, exceptions.MopidyException))
def test_mixer_error_is_a_mopidy_exception(self):
self.assert_(issubclass(
exceptions.MixerError, exceptions.MopidyException))
def test_scanner_error_is_a_mopidy_exception(self):
self.assert_(issubclass(
exceptions.ScannerError, exceptions.MopidyException))
def test_audio_error_is_a_mopidy_exception(self):
self.assert_(issubclass(
exceptions.AudioException, exceptions.MopidyException))