Example #1
0
 def test_pack_image(self):
     d = pack_image(u"image/jpeg", u"Description", "foo", APICType.COVER_FRONT)
     mime, desc, data, type_ = unpack_image(d)
     self.assertEqual(mime, u"image/jpeg")
     self.assertEqual(desc, u"Description")
     self.assertEqual(data, "foo")
     self.assertEqual(type_, APICType.COVER_FRONT)
Example #2
0
 def test_pack_image(self):
     d = pack_image(u"image/jpeg", u"Description", b"foo",
                    APICType.COVER_FRONT)
     mime, desc, data, type_ = unpack_image(d)
     self.assertEqual(mime, u"image/jpeg")
     self.assertEqual(desc, u"Description")
     self.assertEqual(data, b"foo")
     self.assertEqual(type_, APICType.COVER_FRONT)