mopidy/tests/backends/local/events_test.py
Thomas Adamcik 9c2d38e989 local: Remove tag cache support
- Updates doc references to tag cache
- Removes tag cache from config and marks it deprecated
- Removes tag cache from setup.py
- Removes tag cache from config converter
- Removes tag cache from tests
- Converts local library tests to use JSON.
2013-12-04 22:38:16 +01:00

37 lines
990 B
Python

from __future__ import unicode_literals
import unittest
import mock
import pykka
from mopidy import core, audio
from mopidy.backends import listener
from mopidy.backends.local import actor
from tests import path_to_data_dir
@mock.patch.object(listener.BackendListener, 'send')
class LocalBackendEventsTest(unittest.TestCase):
config = {
'local': {
'media_dir': path_to_data_dir(''),
'playlists_dir': b'',
}
}
def setUp(self):
self.audio = audio.DummyAudio.start().proxy()
self.backend = actor.LocalBackend.start(
config=self.config, audio=self.audio).proxy()
self.core = core.Core.start(backends=[self.backend]).proxy()
def tearDown(self):
pykka.ActorRegistry.stop_all()
def test_playlists_refresh_sends_playlists_loaded_event(self, send):
send.reset_mock()
self.core.playlists.refresh().get()
self.assertEqual(send.call_args[0][0], 'playlists_loaded')