Esempio 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)
Esempio 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)
Esempio 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)
Esempio 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)
Esempio 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!')
Esempio 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)
Esempio 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)
Esempio 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': {}})