+ def test_albumart(self):
+ # here is a 34 bytes long data
+ data = bytes('\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x00\x00\x01'
+ '\x00\x01\x00\x00\xff\xdb\x00C\x00\x05\x03\x04',
+ encoding='utf8')
+ read_lines = [b'size: 42\nbinary: 34\n', data, b'\nOK\n']
+ self.MPDWillReturnBinary(read_lines)
+ # Reading albumart / offset 0 should return the data
+ res = self.client.albumart('muse/Raised Fist/2002-Dedication/', 0)
+ self.assertEqual(res.get('data'), data)
+