mirror of
https://github.com/beetbox/beets.git
synced 2026-01-16 21:25:14 +01:00
embedart: Added test case for inputting “no” option interactively.
This commit is contained in:
parent
f6df3befac
commit
64d69f0817
1 changed files with 11 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue