def METHOD_NAME(self):
    cc_task = create_task(PublishCommunity, task_options_with_id)
    community_publish_url = (
        "{}/services/data/v46.0/connect/communities/{}/publish".format(
            cc_task.org_config.instance_url, task_options_with_id["community_id"]
        )
    )
    responses.add(
        method=responses.POST,
        url=community_publish_url,
        status=404,
        json=[
            {
                "errorCode": "NOT_FOUND",
                "message": "The requested resource does not exist",
            }
        ],
    )
    with pytest.raises(SalesforceResourceNotFound):
        cc_task._init_task()
        cc_task._run_task()