'Ensure that validation fails when the content_type header and file
extension do not match'

def test_content_type(self):

    file_upload_bad_mimetype = u'The    Content-Type    header    for    this    file    does    not    match    the    file    data.    The    file    may    be    corrupted.'
    with make_uploaded_file(extension='.jpeg', content_type='image/gif') as uploaded_file:
        with self.assertRaises(ImageValidationError) as ctx:
            validate_uploaded_image(uploaded_file)
        self.assertEqual(ctx.exception.message, file_upload_bad_mimetype)
