mirror of
https://github.com/beetbox/beets.git
synced 2025-12-30 12:32:33 +01:00
Fixed travis errors
This commit is contained in:
parent
232ff05766
commit
20debd020e
1 changed files with 4 additions and 8 deletions
|
|
@ -32,13 +32,13 @@ class FtInTitlePluginFunctional(unittest.TestCase, TestHelper):
|
|||
self.unload_plugins()
|
||||
self.teardown_beets()
|
||||
|
||||
def _ft_add_item(self,path, artist, title, aartist):
|
||||
def _ft_add_item(self, path, artist, title, aartist):
|
||||
return self.add_item(path=path,
|
||||
artist=artist,
|
||||
title=title,
|
||||
albumartist=aartist)
|
||||
|
||||
def _ft_set_config(self, ftformat, drop = False, auto = True):
|
||||
def _ft_set_config(self, ftformat, drop=False, auto=True):
|
||||
self.config['ftintitle']['format'] = ftformat
|
||||
self.config['ftintitle']['drop'] = drop
|
||||
self.config['ftintitle']['auto'] = auto
|
||||
|
|
@ -50,33 +50,29 @@ class FtInTitlePluginFunctional(unittest.TestCase, TestHelper):
|
|||
self.assertEqual(item['artist'], u'Alice')
|
||||
self.assertEqual(item['title'], u'Song 1')
|
||||
|
||||
def test_functional_custom_format_1(self):
|
||||
def test_functional_custom_format(self):
|
||||
self._ft_set_config('feat. {}')
|
||||
|
||||
item = self._ft_add_item('/', u'Alice ft Bob', u'Song 1', u'Alice')
|
||||
self.run_command('ftintitle')
|
||||
item.load()
|
||||
self.assertEqual(item['artist'], u'Alice')
|
||||
self.assertEqual(item['title'], u'Song 1 feat. Bob')
|
||||
|
||||
def test_functional_custom_format_2(self):
|
||||
self._ft_set_config('featuring {}')
|
||||
|
||||
item = self._ft_add_item('/', u'Alice feat. Bob', u'Song 1', u'Alice')
|
||||
self.run_command('ftintitle')
|
||||
item.load()
|
||||
self.assertEqual(item['artist'], u'Alice')
|
||||
self.assertEqual(item['title'], u'Song 1 featuring Bob')
|
||||
|
||||
def test_functional_custom_format_3(self):
|
||||
self._ft_set_config('with {}')
|
||||
|
||||
item = self._ft_add_item('/', u'Alice feat Bob', u'Song 1', u'Alice')
|
||||
self.run_command('ftintitle')
|
||||
item.load()
|
||||
self.assertEqual(item['artist'], u'Alice')
|
||||
self.assertEqual(item['title'], u'Song 1 with Bob')
|
||||
|
||||
|
||||
class FtInTitlePluginTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
"""Set up configuration"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue