def test_guess_cover(self): mediafile = self._mediafile_fixture('image') self.assertEqual(len(mediafile.images), 2) cover = CoverArtField.guess_cover_image(mediafile.images) self.assertEqual(cover.desc, u'album cover') self.assertEqual(mediafile.art, cover.data)