'Run with an error message that is so long it will require
truncation (as well as the jettisoning of the traceback).'

def _test_run_with_long_error_msg(self, task_class):

    task_entry = self._create_input_entry()
    self.define_option_problem(PROBLEM_URL_NAME)
    expected_message = ('x' * 1500)
    with self.assertRaises(TestTaskFailure):
        self._run_task_with_mock_celery(task_class, task_entry.id, task_entry.task_id, expected_message)
    entry = InstructorTask.objects.get(id=task_entry.id)
    self.assertEquals(entry.task_state, FAILURE)
    self.assertGreater(1023, len(entry.task_output))
    output = json.loads(entry.task_output)
    self.assertEquals(output['exception'], 'TestTaskFailure')
    self.assertEquals(output['message'], (expected_message[:(len(output['message']) - 3)] + '...'))
    self.assertNotIn('traceback', output)
