mirror of
https://github.com/beetbox/beets.git
synced 2026-02-16 04:17:07 +01:00
fetchart: fix tests providing album=None
This commit is contained in:
parent
1cc4d11baf
commit
de3e91db87
1 changed files with 4 additions and 2 deletions
|
|
@ -415,6 +415,8 @@ class ArtForAlbumTest(UseThePlugin):
|
|||
|
||||
fetchart.FileSystem.get = fs_source_get
|
||||
|
||||
self.album = _common.Bag()
|
||||
|
||||
def tearDown(self):
|
||||
fetchart.FileSystem.get = self.old_fs_source_get
|
||||
super(ArtForAlbumTest, self).tearDown()
|
||||
|
|
@ -423,7 +425,7 @@ class ArtForAlbumTest(UseThePlugin):
|
|||
self.assertExists(image_file)
|
||||
self.image_file = image_file
|
||||
|
||||
candidate = self.plugin.art_for_album(None, [''], True)
|
||||
candidate = self.plugin.art_for_album(self.album, [''], True)
|
||||
|
||||
if should_exist:
|
||||
self.assertNotEqual(candidate, None)
|
||||
|
|
@ -435,7 +437,7 @@ class ArtForAlbumTest(UseThePlugin):
|
|||
def _assertImageResized(self, image_file, should_resize):
|
||||
self.image_file = image_file
|
||||
with patch.object(ArtResizer.shared, 'resize') as mock_resize:
|
||||
self.plugin.art_for_album(None, [''], True)
|
||||
self.plugin.art_for_album(self.album, [''], True)
|
||||
self.assertEqual(mock_resize.called, should_resize)
|
||||
|
||||
def _require_backend(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue