def METHOD_NAME(self):
    """
    Test when a PublicTask rises an Exception.
    The exception should be caught and added to the ``info`` attribute of
    the result. Besides, the task should be SUCCESS.
    """
    from readthedocs.core.utils.tasks import PublicTask
    from readthedocs.worker import app
    @app.task(name="public_task_exception", base=PublicTask)
    def public_task_exception():
        raise Exception("Something bad happened")
    result = public_task_exception.delay()
    # although the task risen an exception, it's success since we add the
    # exception into the ``info`` attributes
    self.assertEqual(result.status, "SUCCESS")
    self.assertEqual(
        result.info,
        {
            "task_name": "public_task_exception",
            "context": {},
            "public_data": {},
            "error": "Something bad happened",
        },
    )