embedart: Added test case for inputting “no” option interactively.

This commit is contained in:
Aaron 2017-03-10 23:30:49 -08:00
parent f6df3befac
commit 64d69f0817

View file

@ -66,7 +66,7 @@ class EmbedartCliTest(_common.TestCase, TestHelper):
self.unload_plugins()
self.teardown_beets()
def test_embed_art_from_file_with_input(self):
def test_embed_art_from_file_with_yes_input(self):
self._setup_data()
album = self.add_album_fixture()
item = album.items()[0]
@ -75,6 +75,16 @@ class EmbedartCliTest(_common.TestCase, TestHelper):
mediafile = MediaFile(syspath(item.path))
self.assertEqual(mediafile.images[0].data, self.image_data)
def test_embed_art_from_file_with_no_input(self):
self._setup_data()
album = self.add_album_fixture()
item = album.items()[0]
self.io.addinput('n')
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)
def test_embed_art_from_file(self):
self._setup_data()
album = self.add_album_fixture()