- Timestamp:
- 19 Apr 2022, 12:11:11 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.fceokene/trunk/src/waeup/fceokene/applicants/tests/test_browser.py
r16918 r16925 192 192 193 193 def test_final_submit_tpu(self): 194 self.certificate.application_category = 'basic' 195 self.certificate.title = 'NCECert1' 196 notify(grok.ObjectModifiedEvent(self.certificate)) 194 # Create NCE certificate 195 certificate1 = createObject('waeup.Certificate') 196 certificate1.application_category = 'basic' 197 certificate1.code = 'NCECERT1' 198 certificate1.title = 'NCECert1' 199 certificate1.start_level = 100 200 certificate1.end_level = 500 201 certificate1.study_mode = u'nce_ft' 202 self.app['faculties']['fac1']['dep1'].certificates.addCertificate( 203 certificate1) 197 204 IWorkflowState(self.tpuapplicant).setState('paid') 198 205 self.browser.open(self.login_path) … … 204 211 self.browser.getControl(name="form.email").value = 'xx@yy.zz' 205 212 self.browser.getControl(name="form.school").value = ['tpu0010'] 206 self.browser.getControl(name="form.subj_comb").value = [' CERT1']213 self.browser.getControl(name="form.subj_comb").value = ['NCECERT1'] 207 214 image = open(SAMPLE_IMAGE, 'rb') 208 215 ctrl = self.browser.getControl(name='form.passport') … … 224 231 IWorkflowState(dummy).setState('submitted') 225 232 IWorkflowState(self.tpuapplicant).setState('paid') 226 self.tpuapplicant.school = None227 233 self.tpuapplicant.locked = False 228 234 self.browser.open(self.tpuapplicant_path + '/edit') … … 233 239 self.assertEqual(self.tpuapplicant.state, 'paid') 234 240 # Create second certificate 235 certificate = createObject('waeup.Certificate')236 certificate .code = 'CERT2'237 certificate .title = 'NCECert2'238 certificate .application_category = 'basic'239 certificate .start_level = 100240 certificate .end_level = 500241 certificate .study_mode = u'nce_ft'241 certificate2 = createObject('waeup.Certificate') 242 certificate2.code = 'NCECERT2' 243 certificate2.title = 'NCECert2' 244 certificate2.application_category = 'basic' 245 certificate2.start_level = 100 246 certificate2.end_level = 500 247 certificate2.study_mode = u'nce_ft' 242 248 self.app['faculties']['fac1']['dep1'].certificates.addCertificate( 243 certificate )249 certificate2) 244 250 # Create one applicant with same subject and same school 245 251 dummy = createObject(u'waeup.Applicant') … … 247 253 dummy.lastname = u'Doe %s' %i 248 254 dummy.school = 'tpu0012' 249 dummy.subj_comb = self.certificate255 dummy.subj_comb = certificate1 250 256 self.app['applicants'][ 251 257 self.tpucontainer.code].addApplicant(dummy) … … 253 259 self.browser.open(self.tpuapplicant_path + '/edit') 254 260 self.browser.getControl(name="form.school").value = ['tpu0012'] 255 self.browser.getControl(name="form.subj_comb").value = [' CERT1']261 self.browser.getControl(name="form.subj_comb").value = ['NCECERT1'] 256 262 self.browser.getControl("Finally Submit").click() 257 263 self.assertTrue("Maximum number of applications per school exceeded." … … 261 267 self.browser.open(self.tpuapplicant_path + '/edit') 262 268 self.browser.getControl(name="form.school").value = ['tpu0012'] 263 self.browser.getControl(name="form.subj_comb").value = [' CERT2']269 self.browser.getControl(name="form.subj_comb").value = ['NCECERT2'] 264 270 self.browser.getControl("Finally Submit").click() 265 271 self.assertEqual(self.tpuapplicant.state, 'submitted')
Note: See TracChangeset for help on using the changeset viewer.