'Tests the resubmission of an instructor task through the API.
The call to the API is a lambda expression passed via
`api_call`.  Expects that the API call returns the resulting
InstructorTask object, and that its resubmission raises
`AlreadyRunningError`.'

def _test_resubmission(self, api_call):

    instructor_task = api_call()
    instructor_task = InstructorTask.objects.get(id=instructor_task.id)
    instructor_task.task_state = PROGRESS
    instructor_task.save()
    with self.assertRaises(AlreadyRunningError):
        api_call()
