Changeset 16926 for main/waeup.fceokene/trunk/src/waeup
- Timestamp:
- 19 Apr 2022, 15:33:02 (3 years ago)
- Location:
- main/waeup.fceokene/trunk/src/waeup/fceokene/applicants
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.fceokene/trunk/src/waeup/fceokene/applicants/browser.py
r16925 r16926 216 216 target = getattr(container, 'prefix', None) 217 217 if target == 'tpu': 218 school = 'school_tpu' 218 219 max = 10 219 220 else: 220 221 max = 7 222 school = 'school_utp' 221 223 for appl in container.values(): 222 224 if appl != self.context \ 223 225 and appl.state in (SUBMITTED, ADMITTED, NOT_ADMITTED, CREATED): 224 if appl.school == data.get('school'):226 if getattr(appl, school) == data.get(school): 225 227 counter += 1 226 228 if appl.subj_comb == data.get('subj_comb'): -
main/waeup.fceokene/trunk/src/waeup/fceokene/applicants/export.py
r16918 r16926 47 47 """ 48 48 SCHOOLS.update(SCHOOLS_UTP) 49 if name == 'school'and value is not None:49 if name.startswith('school') and value is not None: 50 50 try: 51 51 value = '%s - %s - %s' % ( -
main/waeup.fceokene/trunk/src/waeup/fceokene/applicants/interfaces.py
r16924 r16926 188 188 ) 189 189 190 school = schema.Choice(190 school_tpu = schema.Choice( 191 191 title = _(u'1st Choice TPZ and School'), 192 192 source = TPUSchoolSource(), -
main/waeup.fceokene/trunk/src/waeup/fceokene/applicants/tests/test_browser.py
r16925 r16926 210 210 self.browser.open(self.tpuapplicant_path + '/edit') 211 211 self.browser.getControl(name="form.email").value = 'xx@yy.zz' 212 self.browser.getControl(name="form.school ").value = ['tpu0010']212 self.browser.getControl(name="form.school_tpu").value = ['tpu0010'] 213 213 self.browser.getControl(name="form.subj_comb").value = ['NCECERT1'] 214 214 image = open(SAMPLE_IMAGE, 'rb') … … 226 226 dummy.firstname = u'John' 227 227 dummy.lastname = u'Doe %s' %i 228 dummy.school = 'tpu0010'228 dummy.school_tpu = 'tpu0010' 229 229 self.app['applicants'][ 230 230 self.tpucontainer.code].addApplicant(dummy) … … 233 233 self.tpuapplicant.locked = False 234 234 self.browser.open(self.tpuapplicant_path + '/edit') 235 self.browser.getControl(name="form.school ").value = ['tpu0010']235 self.browser.getControl(name="form.school_tpu").value = ['tpu0010'] 236 236 self.browser.getControl("Finally Submit").click() 237 237 self.assertTrue("Maximum number of applications per school exceeded." … … 252 252 dummy.firstname = u'John' 253 253 dummy.lastname = u'Doe %s' %i 254 dummy.school = 'tpu0012'254 dummy.school_tpu = 'tpu0012' 255 255 dummy.subj_comb = certificate1 256 256 self.app['applicants'][ … … 258 258 IWorkflowState(dummy).setState('submitted') 259 259 self.browser.open(self.tpuapplicant_path + '/edit') 260 self.browser.getControl(name="form.school ").value = ['tpu0012']260 self.browser.getControl(name="form.school_tpu").value = ['tpu0012'] 261 261 self.browser.getControl(name="form.subj_comb").value = ['NCECERT1'] 262 262 self.browser.getControl("Finally Submit").click() … … 266 266 self.assertEqual(self.tpuapplicant.state, 'paid') 267 267 self.browser.open(self.tpuapplicant_path + '/edit') 268 self.browser.getControl(name="form.school ").value = ['tpu0012']268 self.browser.getControl(name="form.school_tpu").value = ['tpu0012'] 269 269 self.browser.getControl(name="form.subj_comb").value = ['NCECERT2'] 270 270 self.browser.getControl("Finally Submit").click()
Note: See TracChangeset for help on using the changeset viewer.