def setUpClass(cls): conf = get_config() if conf.has_section('discogs') and \ conf.get('discogs', 'token') and \ conf.get('discogs', 'secret'): cls.dapr = factory('discogs', conf) else: raise unittest.SkipTest('no discogs auth')
def setUpClass(cls): conf = get_config() if conf.has_section('redacted') and ( conf.get('redacted', 'session') or ( conf.get('redacted', 'username') and conf.get('redacted', 'password'))): cls.dapr = factory('redacted', conf) else: raise unittest.SkipTest('no redacted auth')
def setUpClass(cls): cls.dapr = factory('lastfm', None)
def test_factory_fail(self): with self.assertRaises(DataProviderError): factory('fail', None)
def test_factory(self): conf = get_config() for name in ['lastfm', 'mbrainz']: factory(name, conf)
def setUpClass(cls): cls.dapr = factory('mbrainz', None)