'Test mimetype for computed field wich resize picture'

def test_ir_http_mimetype_computed_field(self):

    prop = self.env['ir.property'].create({'fields_id': self.env['ir.model.fields'].search([], limit=1).id, 'name': 'Property    binary', 'value_binary': GIF, 'type': 'binary'})
    resized = odoo.tools.image_get_resized_images(prop.value_binary, return_big=True, avoid_resize_medium=True)['image_small']
    prop.write({'value_binary': resized})
    (status, headers, content) = self.env['ir.http'].binary_content(model='ir.property', id=prop.id, field='value_binary', default_mimetype='application/octet-stream', env=self.env)
    mimetype = dict(headers).get('Content-Type')
    self.assertEqual(mimetype, 'image/gif')
