def METHOD_NAME(self, file):
    mimetype_from_content_resolver = Mock(side_effect=MimeTypeResolvingError)
    mimetype_from_content_factory = Mock(return_value=mimetype_from_content_resolver)
    mimetype_from_filename_resolver = Mock(return_value='image/png')
    mimetype_from_filename_factory = Mock(return_value=mimetype_from_filename_resolver)
    validator = MimeTypeIntegrityValidator(mimetype_from_content_factory, mimetype_from_filename_factory)
    with pytest.raises(ValidationError) as e_info:
        validator(file)
    assert e_info.value.message == "Failed to resolve mime type from file content!"