Ejemplo n.º 1
0
    def test_get_default_config(self):
        ext = GMusicExtension()

        config = ext.get_default_config()

        self.assertIn("[gmusic]", config)
        self.assertIn("enabled = true", config)
Ejemplo n.º 2
0
    def test_get_default_config(self):
        ext = GMusicExtension()

        config = ext.get_default_config()

        self.assertIn('[gmusic]', config)
        self.assertIn('enabled = true', config)
Ejemplo n.º 3
0
    def test_get_config_schema(self):
        ext = GMusicExtension()

        schema = ext.get_config_schema()

        self.assertIn("username", schema)
        self.assertIn("password", schema)
        self.assertIn("deviceid", schema)
Ejemplo n.º 4
0
    def test_get_backend_classes(self):
        registry = mock.Mock()

        ext = GMusicExtension()
        ext.setup(registry)

        registry.add.assert_called_once_with('backend',
                                             backend_lib.GMusicBackend)
Ejemplo n.º 5
0
    def test_get_config_schema(self):
        ext = GMusicExtension()

        schema = ext.get_config_schema()

        self.assertIn('username', schema)
        self.assertIn('password', schema)
        self.assertIn('deviceid', schema)
Ejemplo n.º 6
0
    def test_get_backend_classes(self):
        registry = mock.Mock()

        ext = GMusicExtension()
        ext.setup(registry)

        registry.add.assert_called_once_with(
            'backend', backend_lib.GMusicBackend)
Ejemplo n.º 7
0
    def test_get_config_schema(self):
        ext = GMusicExtension()

        schema = ext.get_config_schema()

        self.assertIn('username', schema)
        self.assertIn('password', schema)
        self.assertIn('deviceid', schema)
Ejemplo n.º 8
0
    def test_get_default_config(self):
        ext = GMusicExtension()

        config = ext.get_default_config()

        self.assertIn('[gmusic]', config)
        self.assertIn('enabled = true', config)
        self.assertIn('all_access =', config)
        self.assertIn('radio_stations_in_browse = true', config)
        self.assertIn('radio_stations_count =', config)
        self.assertIn('radio_tracks_count = 25', config)
Ejemplo n.º 9
0
    def test_get_backend_classes(self):
        registry = mock.Mock()

        ext = GMusicExtension()
        ext.setup(registry)

        self.assertIn(mock.call('backend', backend_lib.GMusicBackend),
                      registry.add.mock_calls)
        self.assertIn(
            mock.call('frontend', scrobbler_frontend.GMusicScrobblerFrontend),
            registry.add.mock_calls)
Ejemplo n.º 10
0
    def test_get_default_config(self):
        ext = GMusicExtension()

        config = ext.get_default_config()

        self.assertIn('[gmusic]', config)
        self.assertIn('enabled = true', config)
        self.assertIn('all_access =', config)
        self.assertIn('radio_stations_in_browse = true', config)
        self.assertIn('radio_stations_count =', config)
        self.assertIn('radio_tracks_count = 25', config)
Ejemplo n.º 11
0
    def test_get_backend_classes(self):
        registry = mock.Mock()

        ext = GMusicExtension()
        ext.setup(registry)

        self.assertIn(
            mock.call('backend', backend_lib.GMusicBackend),
            registry.add.mock_calls)
        self.assertIn(
            mock.call('frontend', scrobbler_frontend.GMusicScrobblerFrontend),
            registry.add.mock_calls)
Ejemplo n.º 12
0
    def test_get_config_schema(self):
        ext = GMusicExtension()

        schema = ext.get_config_schema()

        self.assertIn('username', schema)
        self.assertIn('password', schema)
        self.assertIn('deviceid', schema)
        self.assertIn('refresh_library', schema)
        self.assertIn('refresh_playlists', schema)
        self.assertIn('all_access', schema)
        self.assertIn('radio_stations_in_browse', schema)
        self.assertIn('radio_stations_as_playlists', schema)
        self.assertIn('radio_stations_count', schema)
        self.assertIn('radio_tracks_count', schema)
Ejemplo n.º 13
0
    def test_get_config_schema(self):
        ext = GMusicExtension()

        schema = ext.get_config_schema()

        self.assertIn('username', schema)
        self.assertIn('password', schema)
        self.assertIn('deviceid', schema)
        self.assertIn('refresh_library', schema)
        self.assertIn('refresh_playlists', schema)
        self.assertIn('all_access', schema)
        self.assertIn('radio_stations_in_browse', schema)
        self.assertIn('radio_stations_as_playlists', schema)
        self.assertIn('radio_stations_count', schema)
        self.assertIn('radio_tracks_count', schema)
Ejemplo n.º 14
0
    def test_get_backend_classes(self):
        ext = GMusicExtension()

        backends = ext.get_backend_classes()

        self.assertIn(backend_lib.GMusicBackend, backends)