def test_browse_radio_deactivated(self): config = ExtensionTest.get_config() config["gmusic"]["radio_stations_in_browse"] = False self.backend = backend_lib.GMusicBackend(config=config, audio=None) refs = self.backend.library.browse("gmusic:directory") for ref in refs: assert ref.uri != "gmusic:radio"
def test_browse_radio_deactivated(self): config = ExtensionTest.get_config() config['gmusic']['radio_stations_in_browse'] = False self.backend = backend_lib.GMusicBackend(config=config, audio=None) refs = self.backend.library.browse('gmusic:directory') for ref in refs: self.assertNotEqual(ref.uri, 'gmusic:radio')
def setUp(self): backend = mock.Mock() backend.config = ExtensionTest.get_config() self.provider = GMusicPlaylistsProvider(backend) self.provider._playlists = { 'gmusic:playlist:foo': Playlist( uri='gmusic:playlist:foo', name='foo', tracks=[Track(uri='gmusic:track:test_track', name='test')]), 'gmusic:playlist:boo': Playlist( uri='gmusic:playlist:boo', name='boo', tracks=[]), }
def setUp(self): backend = mock.Mock() backend.config = ExtensionTest.get_config() self.provider = GMusicPlaylistsProvider(backend) self.provider._playlists = { "gmusic:playlist:foo": Playlist( uri="gmusic:playlist:foo", name="foo", tracks=[Track(uri="gmusic:track:test_track", name="test")], ), "gmusic:playlist:boo": Playlist(uri="gmusic:playlist:boo", name="boo", tracks=[]), }
def setUp(self): config = ExtensionTest.get_config() self.backend = backend_lib.GMusicBackend(config=config, audio=None)