'Provides mock result to caller of instructor_task_status, and returns resulting output.'

def _test_get_status_from_result(self, task_id, mock_result=None):

    with patch('celery.result.AsyncResult.__new__') as mock_result_ctor:
        mock_result_ctor.return_value = mock_result
        response = self._get_instructor_task_status(task_id)
    output = json.loads(response.content)
    self.assertEquals(output['task_id'], task_id)
    return output
