Skip to content

Commit

Permalink
Add test for #314
Browse files Browse the repository at this point in the history
Ensure that album art is preserved when an album is re-imported.
  • Loading branch information
reiv committed Nov 3, 2015
1 parent 33ea9f1 commit 21f926f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/test_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1592,6 +1592,18 @@ def test_reimported_item_preserves_added(self):
self.importer.run()
self.assertEqual(self._item().added, 4747.0)

def test_reimported_item_preserves_art(self):
self._setup_session()
artpath = os.path.join(_common.RSRC, 'abbey.jpg')
replaced_album = self._album()
replaced_album.set_art(artpath)
replaced_album.store()
self.importer.run()
new_album = self._album()
new_artpath = new_album.art_destination(artpath)
self.assertEqual(new_album.artpath, new_artpath)
self.assertTrue(os.path.exists(new_artpath))


class ImportPretendTest(_common.TestCase, ImportHelper):
""" Test the pretend commandline option
Expand Down

0 comments on commit 21f926f

Please sign in to comment.