tests: fix assertions for empty MediaFile.images

used to work due to inconsistent mediafile implementation, but with
https://github.com/beetbox/mediafile/pull/64 (in mediafile >= 0.11.0)
list fields are None if non-existent, not the empty list
This commit is contained in:
wisp3rwind 2022-12-18 08:41:42 +01:00
parent d7273bddb3
commit d5f998b312
2 changed files with 3 additions and 3 deletions

View file

@ -82,7 +82,7 @@ class EmbedartCliTest(_common.TestCase, TestHelper):
self.run_command('embedart', '-f', self.small_artpath)
mediafile = MediaFile(syspath(item.path))
# make sure that images array is empty (nothing embedded)
self.assertEqual(len(mediafile.images), 0)
self.assertFalse(mediafile.images)
def test_embed_art_from_file(self):
self._setup_data()
@ -203,7 +203,7 @@ class EmbedartCliTest(_common.TestCase, TestHelper):
self.io.addinput('y')
self.run_command('clearart')
mediafile = MediaFile(syspath(item.path))
self.assertEqual(len(mediafile.images), 0)
self.assertFalse(mediafile.images)
def test_clear_art_with_no_input(self):
self._setup_data()

View file

@ -103,7 +103,7 @@ class ZeroPluginTest(unittest.TestCase, TestHelper):
item.write()
mf = MediaFile(syspath(path))
self.assertEqual(0, len(mf.images))
self.assertFalse(mf.images)
def test_auto_false(self):
self.config['zero']['fields'] = ['year']