Ejemplo n.º 1
0
 def setup(self, update_cache=False, verbose=0):
     """Set up the WhatLastGenre object."""
     whitelist = self.config['whitelist'].get()
     if whitelist == 'wlg':
         whitelist = ''
     elif whitelist == 'beets':
         whitelist = BEET_LG_WHITELIST
     conf = whatlastgenre.Config(
         Namespace(tag_limit=self.config['count'].get(int),
                   update_cache=update_cache,
                   verbose=verbose,
                   dry=False,
                   difflib=False,
                   release=False))
     conf.set('wlg', 'whitelist', str(whitelist))
     self.wlg = whatlastgenre.WhatLastGenre(conf)
 def setUpClass(cls):
     conf = get_config()
     conf.set('wlg', 'sources', 'lastfm')
     cls.wlg = whatlastgenre.WhatLastGenre(conf)