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

        config = ext.get_default_config()

        self.assertIn('[soundcloud]', config)
        self.assertIn('enabled = True', config)
Ejemplo n.º 2
0
    def test_get_config_schema(self):
        ext = SoundCloudExtension()

        schema = ext.get_config_schema()

        self.assertIn('auth_token', schema)
        self.assertIn('explore_songs', schema)
Ejemplo n.º 3
0
    def test_get_default_config(self):
        ext = SoundCloudExtension()

        config = ext.get_default_config()

        self.assertIn('[soundcloud]', config)
        self.assertIn('enabled = True', config)
Ejemplo n.º 4
0
    def test_get_config_schema(self):
        ext = SoundCloudExtension()

        schema = ext.get_config_schema()

        self.assertIn('auth_token', schema)
        self.assertIn('explore_songs', schema)
Ejemplo n.º 5
0
 def test_responds_with_error(self):
     with mock.patch('mopidy_soundcloud.soundcloud.logger.error') as d:
         config = SoundCloudExtension().get_config_schema()
         config['auth_token'] = '1-fake-token'
         SoundCloudClient(config)
         d.assert_called_once_with('Invalid "auth_token" used for '
                                   'SoundCloud authentication!')
Ejemplo n.º 6
0
 def setUp(self):
     config = SoundCloudExtension().get_config_schema()
     config['auth_token'] = '1-35204-61921957-55796ebef403996'
     # using this user http://maildrop.cc/inbox/mopidytestuser
     self.backend = actor.SoundCloudBackend.start(config={
         'soundcloud': config
     },
                                                  audio=None).proxy()
     self.library = SoundCloudLibraryProvider(backend=self.backend)
Ejemplo n.º 7
0
 def setUp(self):
     config = SoundCloudExtension().get_config_schema()
     config['auth_token'] = '1-35204-61921957-55796ebef403996'
     config['explore_songs'] = 10
     # using this user http://maildrop.cc/inbox/mopidytestuser
     self.api = SoundCloudClient(config)
Ejemplo n.º 8
0
 def setUp(self):
     config = SoundCloudExtension().get_config_schema()
     config['auth_token'] = '1-35204-61921957-55796ebef403996'
     config['explore_songs'] = 10
     self.api = SoundCloudClient({'soundcloud': config, 'proxy': {}})