Merge pull request #999 from tkem/fix/998

Fix #998: Remove event already sent by PlaylistsController.
This commit is contained in:
Thomas Adamcik 2015-02-25 21:05:53 +01:00
commit 0829f34a90
2 changed files with 0 additions and 40 deletions

View File

@ -67,8 +67,6 @@ class LocalPlaylistsProvider(backend.PlaylistsProvider):
playlists.append(playlist)
self.playlists = playlists
# TODO: send what scheme we loaded them for?
backend.BackendListener.send('playlists_loaded')
logger.info(
'Loaded %d local playlists from %s',

View File

@ -1,38 +0,0 @@
from __future__ import absolute_import, unicode_literals
import unittest
import mock
import pykka
from mopidy import backend, core
from mopidy.local import actor
from tests import dummy_audio, path_to_data_dir
@mock.patch.object(backend.BackendListener, 'send')
class LocalBackendEventsTest(unittest.TestCase):
config = {
'local': {
'media_dir': path_to_data_dir(''),
'data_dir': path_to_data_dir(''),
'playlists_dir': b'',
'library': 'json',
}
}
def setUp(self): # noqa: N802
self.audio = dummy_audio.create_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): # noqa: N802
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')