Changeset 9701 for main/waeup.kofa/trunk/src/waeup/kofa/browser
- Timestamp:
- 20 Nov 2012, 11:16:38 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/browser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r9610 r9701 123 123 def delSubobjects(view, redirect, tab=None, subcontainer=None): 124 124 form = view.request.form 125 if form.has_key('val_id'):125 if 'val_id' in form: 126 126 child_id = form['val_id'] 127 127 else: … … 242 242 # has been set. 243 243 login = self.request.form['form.login'] 244 if len(login) == 8 and grok.getSite()['students'].has_key(login):244 if len(login) == 8 and login in grok.getSite()['students']: 245 245 student = grok.getSite()['students'][login] 246 246 password = self.request.form['form.password'] … … 841 841 def delFiles(self, **data): 842 842 form = self.request.form 843 if form.has_key('val_id'):843 if 'val_id' in form: 844 844 child_id = form['val_id'] 845 845 else: -
main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_browser.py
r9326 r9701 316 316 # former_course attribute of the corresponding course is set. 317 317 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 318 self.assertTrue( self.app['faculties']['fac1']['dep1'].certificates[319 ' CERT1'].has_key('COURSE1_100'))318 self.assertTrue('COURSE1_100' in self.app[ 319 'faculties']['fac1']['dep1'].certificates['CERT1']) 320 320 self.browser.open( 321 321 'http://localhost/app/faculties/fac1/dep1/courses/COURSE1/manage') 322 322 self.browser.getControl(name="form.former_course").value = ['selected'] 323 323 self.browser.getControl("Save").click() 324 self.assertFalse( self.app['faculties']['fac1']['dep1'].certificates[325 ' CERT1'].has_key('COURSE1_100'))324 self.assertFalse('COURSE1_100' in self.app[ 325 'faculties']['fac1']['dep1'].certificates['CERT1']) 326 326 return 327 327 … … 330 330 # the corresponding course is removed. 331 331 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 332 self.assertTrue( self.app['faculties']['fac1']['dep1'].certificates[333 ' CERT1'].has_key('COURSE1_100'))332 self.assertTrue('COURSE1_100' in self.app[ 333 'faculties']['fac1']['dep1'].certificates['CERT1']) 334 334 self.browser.open('http://localhost/app/faculties/fac1/dep1/manage') 335 335 ctrl = self.browser.getControl(name='val_id') 336 336 ctrl.getControl(value='COURSE1').selected = True 337 337 self.browser.getControl("Remove selected", index=0).click() 338 self.assertFalse( self.app['faculties']['fac1']['dep1'].certificates[339 ' CERT1'].has_key('COURSE1_100'))340 return 338 self.assertFalse('COURSE1_100' in self.app[ 339 'faculties']['fac1']['dep1'].certificates['CERT1']) 340 return
Note: See TracChangeset for help on using the changeset viewer.