mirror of
https://github.com/beetbox/beets.git
synced 2025-12-24 17:43:52 +01:00
Simple test fixes
importfeeds, lastgenre
This commit is contained in:
parent
8097ff8c1d
commit
1f0932968e
2 changed files with 5 additions and 4 deletions
|
|
@ -6,7 +6,7 @@ import shutil
|
|||
from _common import unittest
|
||||
from beets import config
|
||||
from beets.library import Item, Album, Library
|
||||
from beetsplug.importfeeds import album_imported, ImportFeedsPlugin
|
||||
from beetsplug.importfeeds import ImportFeedsPlugin
|
||||
|
||||
|
||||
class ImportfeedsTestTest(unittest.TestCase):
|
||||
|
|
@ -30,7 +30,7 @@ class ImportfeedsTestTest(unittest.TestCase):
|
|||
self.lib.add(album)
|
||||
self.lib.add(item)
|
||||
|
||||
album_imported(self.lib, album)
|
||||
self.importfeeds.album_imported(self.lib, album)
|
||||
playlist_path = os.path.join(self.feeds_dir,
|
||||
os.listdir(self.feeds_dir)[0])
|
||||
self.assertTrue(playlist_path.endswith('album_name.m3u'))
|
||||
|
|
|
|||
|
|
@ -157,9 +157,10 @@ class LastGenrePluginTest(unittest.TestCase, TestHelper):
|
|||
tag2.item = MockPylastElem(u'Rap')
|
||||
return [tag1, tag2]
|
||||
|
||||
res = lastgenre._tags_for(MockPylastObj())
|
||||
plugin = lastgenre.LastGenrePlugin()
|
||||
res = plugin._tags_for(MockPylastObj())
|
||||
self.assertEqual(res, [u'pop', u'rap'])
|
||||
res = lastgenre._tags_for(MockPylastObj(), min_weight=50)
|
||||
res = plugin._tags_for(MockPylastObj(), min_weight=50)
|
||||
self.assertEqual(res, [u'pop'])
|
||||
|
||||
def test_get_genre(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue