コード例 #1
0
 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')
コード例 #2
0
 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')
コード例 #3
0
 def setUpClass(cls):
     cls.dapr = factory('lastfm', None)
コード例 #4
0
 def test_factory_fail(self):
     with self.assertRaises(DataProviderError):
         factory('fail', None)
コード例 #5
0
 def test_factory(self):
     conf = get_config()
     for name in ['lastfm', 'mbrainz']:
         factory(name, conf)
コード例 #6
0
 def setUpClass(cls):
     cls.dapr = factory('mbrainz', None)