def test_get_default_config(self): ext = SoundCloudExtension() config = ext.get_default_config() self.assertIn('[soundcloud]', config) self.assertIn('enabled = True', config)
def test_get_config_schema(self): ext = SoundCloudExtension() schema = ext.get_config_schema() self.assertIn('auth_token', schema) self.assertIn('explore_songs', schema)
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!')
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)
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)
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': {}})