'Test that when corrupt file is provided to validate_video_image, it gives proper error message.'

def test_currupt_image_file(self):

    with open((settings.MEDIA_ROOT + '/test-corrupt-image.png'), 'w+') as file:
        image_file = UploadedFile(file, content_type='image/png', size=settings.VIDEO_IMAGE_SETTINGS['VIDEO_IMAGE_MIN_BYTES'])
        error = validate_video_image(image_file)
        self.assertEquals(error, 'There    is    a    problem    with    this    image    file.    Try    to    upload    a    different    file.')
