def METHOD_NAME(request, test_job_id, method='resubmit'):
    testjob = get_object_or_404(TestJob.objects, pk=test_job_id)
    user = auth_user_from_request(request, request.user)
    project = testjob.target
    if not project.can_submit_testjobs(user):
        return HttpResponse(status=401)
    call = getattr(testjob, method)
    try:
        ret_value = call()
        new_testjob = testjob.resubmitted_jobs.last()
        if new_testjob is not None:
            log_addition(request, new_testjob, "Create testjob as resubmission")
    except SubmissionIssue as e:
        return HttpResponse(str(e), status=500)
    if ret_value:
        return HttpResponse(status=201)
    # return 403 when resubmit call is unsuccessful
    return HttpResponse(status=403)