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

« back to all changes in this revision

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

  • Committer: Nick Chadwick
  • Date: 2009-03-10 14:10:51 UTC
  • mto: This revision was merged to the branch mainline in revision 1162.
  • Revision ID: chadnickbok@gmail.com-20090310141051-m9m1sb8rgqt4j6li
Removed some extraneous output in exercise REST views, when encountering
exceptions.

These views should only ever be accessed via REST, so no detailed
explanation is useful.

Show diffs side-by-side

added added

removed removed

Lines of Context:
211
211
            TestSuite.suiteid == int(suiteid),
212
212
            TestSuite.exercise_id == self.context.id).one()
213
213
        if suite is None:
214
 
            raise NotFound('testsuite')
 
214
            raise NotFound()
215
215
        
216
216
        test_case = req.store.find(TestCase,
217
217
            TestCase.suiteid == suite.suiteid,
218
218
            TestCase.testid == int(testid)).one()
219
219
        if test_case is None:
220
 
            raise NotFound('testcase')
 
220
            raise NotFound()
221
221
        
222
222
        test_case.passmsg = unicode(passmsg)
223
223
        test_case.failmsg = unicode(failmsg)
252
252
            TestSuite.suiteid == int(suiteid),
253
253
            TestSuite.exercise_id == self.context.id).one()
254
254
        if suite is None:
255
 
            raise NotFound('testsuite')
 
255
            raise NotFound()
256
256
        
257
257
        test_case = req.store.find(TestCase,
258
258
            TestCase.suiteid == suite.suiteid,
259
259
            TestCase.testid == int(testid)).one()
260
260
        if test_case is None:
261
 
            raise NotFound('testcase')
 
261
            raise NotFound()
262
262
        
263
263
        test_part = req.store.find(TestCasePart,
264
264
            TestCasePart.testid == test_case.testid,
281
281
            TestSuite.suiteid == int(suiteid),
282
282
            TestSuite.exercise_id == self.context.id).one()
283
283
        if suite is None:
284
 
            raise NotFound('testsuite')
 
284
            raise NotFound()
285
285
        
286
286
        test_case = req.store.find(TestCase,
287
287
            TestCase.suiteid == suite.suiteid,
288
288
            TestCase.testid == int(testid)).one()
289
289
        if test_case is None:
290
 
            raise NotFound('testcase')
 
290
            raise NotFound()
291
291
        
292
292
        test_part = TestCasePart()
293
293
        test_part.part_type = unicode(part_type)
317
317
            TestCasePart.testid == test_case.testid,
318
318
            TestCasePart.partid == int(partid)).one()
319
319
        if test_part is None:
320
 
            raise NotFound('testcasepart')
 
320
            raise NotFound()
321
321
        
322
322
        test_part.delete(req.store)
323
323