~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/tutorial/exercise_service.py

  • Committer: William Grant
  • Date: 2009-12-15 00:29:47 UTC
  • Revision ID: me@williamgrant.id.au-20091215002947-b9c4cdj4b0hkoawz
Display TestErrors in test mode, much like TestCreationErrors.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
from ivle.webapp.base.rest import (JSONRESTView, named_operation,
25
25
                                   require_permission)
26
26
from ivle.webapp.errors import NotFound, BadRequest
27
 
from ivle.webapp.tutorial.test.TestFramework import TestCreationError
 
27
from ivle.webapp.tutorial.test.TestFramework import (
 
28
    TestCreationError, TestError)
28
29
from ivle.worksheet.utils import test_exercise_submission
29
30
 
30
31
 
324
325
                req.config, req.user, self.context, code)
325
326
        except TestCreationError, e:
326
327
            return {'critical_error': {'name': 'TestCreationError', 'detail': e._reason}}
 
328
        except TestError, e:
 
329
            return {'critical_error': {'name': 'TestError', 'detail': str(e)}}