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

« back to all changes in this revision

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

MergedĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
        req.store.add(new_var)
140
140
        
141
141
        return {'result': 'ok'}
 
142
 
 
143
    @named_operation('edit')
 
144
    def edit_var(self, req, suiteid, varid, var_type, var_name, var_val, argno):
 
145
        var = req.store.find(TestSuiteVar,
 
146
            TestSuiteVar.varid == int(varid),
 
147
            TestSuiteVar.suiteid == int(suiteid)
 
148
        ).one()
 
149
        
 
150
        if var is None:
 
151
            raise NotFound()
 
152
            
 
153
        var.var_type = unicode(var_type)
 
154
        var.var_name = unicode(var_name)
 
155
        var.var_val = unicode(var_val)
 
156
        var.argno = int(argno)
 
157
        
 
158
        return {'result': 'ok'}
 
159
    
 
160
    @named_operation
 
161
    def add_testcase(): pass