Example #1
0
    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"
Example #2
0
    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')
Example #3
0
    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')
Example #4
0
 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=[]),
     }
Example #5
0
 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=[]),
     }
Example #6
0
 def setUp(self):
     config = ExtensionTest.get_config()
     self.backend = backend_lib.GMusicBackend(config=config, audio=None)
Example #7
0
 def setUp(self):
     config = ExtensionTest.get_config()
     self.backend = backend_lib.GMusicBackend(config=config, audio=None)