Add new features
This commit is contained in:
@@ -45,6 +45,12 @@ class PathTestCase(unittest.TestCase):
|
||||
|
||||
# TODO: Test cover art embedding too.
|
||||
class CoverArtTestCase(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.cover_art_path = None
|
||||
|
||||
def tearDown(self):
|
||||
if self.cover_art_path and os.path.exists(self.cover_art_path):
|
||||
os.unlink(self.cover_art_path)
|
||||
|
||||
@staticmethod
|
||||
def _mock_get_front_image(release_id):
|
||||
@@ -90,5 +96,6 @@ class CoverArtTestCase(unittest.TestCase):
|
||||
# https://musicbrainz.org/release/76df3287-6cda-33eb-8e9a-044b5e15ffdd
|
||||
path = os.path.dirname(__file__)
|
||||
release_id = "76df3287-6cda-33eb-8e9a-044b5e15ffdd"
|
||||
coverArtPath = self._mock_getCoverArt(path, release_id)
|
||||
self.assertTrue(os.path.isfile(coverArtPath))
|
||||
self.cover_art_path = self._mock_getCoverArt(path, release_id)
|
||||
self.assertEqual(self.cover_art_path, os.path.join(path, 'cover.jpg'))
|
||||
self.assertTrue(os.path.isfile(self.cover_art_path))
|
||||
|
||||
Reference in New Issue
Block a user