From 2ae68d971a56b06c47e894d6496ae175f6a26282 Mon Sep 17 00:00:00 2001 From: Thomas Kemmer Date: Wed, 25 Feb 2015 17:35:06 +0100 Subject: [PATCH 1/2] Fix #998: Remove event already sent by PlaylistsController. --- mopidy/local/playlists.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/mopidy/local/playlists.py b/mopidy/local/playlists.py index deeae2b5..2c53d91a 100644 --- a/mopidy/local/playlists.py +++ b/mopidy/local/playlists.py @@ -57,8 +57,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', From 96a3cb6ef5918ee8e6292f2bda4418c41f130c54 Mon Sep 17 00:00:00 2001 From: Thomas Kemmer Date: Wed, 25 Feb 2015 17:48:41 +0100 Subject: [PATCH 2/2] Remove obsolete unit test. --- tests/local/test_events.py | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 tests/local/test_events.py diff --git a/tests/local/test_events.py b/tests/local/test_events.py deleted file mode 100644 index 945347df..00000000 --- a/tests/local/test_events.py +++ /dev/null @@ -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')