From 64d69f0817c0282fa71ee980ce3c6d602ce52730 Mon Sep 17 00:00:00 2001 From: Aaron Date: Fri, 10 Mar 2017 23:30:49 -0800 Subject: [PATCH] =?UTF-8?q?embedart:=20Added=20test=20case=20for=20inputti?= =?UTF-8?q?ng=20=E2=80=9Cno=E2=80=9D=20option=20interactively.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/test_embedart.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/test_embedart.py b/test/test_embedart.py index 30e4841ba..1622fffb4 100644 --- a/test/test_embedart.py +++ b/test/test_embedart.py @@ -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()