Changeset 7259 for main/waeup.sirp/trunk/src/waeup/sirp/applicants
- Timestamp:
- 3 Dec 2011, 08:35:33 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/applicants
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
r7255 r7259 477 477 return '' 478 478 479 class ApplicantBaseDisplayFormPage(ApplicantDisplayFormPage): 480 grok.context(IApplicant) 481 grok.name('base') 482 form_fields = grok.AutoFields(IApplicant).select( 483 'applicant_id', 'firstname', 'lastname','email', 'course1') 484 479 485 class AcceptanceFeePaymentAddPage(grok.View): 480 486 """ Page to add an online payment ticket … … 625 631 self.redirect(self.url(self.context)) 626 632 return 627 applicantview = Applicant DisplayFormPage(self.context.__parent__,633 applicantview = ApplicantBaseDisplayFormPage(self.context.__parent__, 628 634 self.request) 629 635 students_utils = getUtility(IStudentsUtils) -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_browser.py
r7252 r7259 286 286 self.assertEqual(self.browser.headers['Status'], '200 Ok') 287 287 self.assertEqual(self.browser.url, self.add_applicant_path) 288 self.browser.getControl(name="form.firstname").value = 'Albert' 289 self.browser.getControl(name="form.lastname").value = 'Einstein' 288 self.browser.getControl(name="form.firstname").value = 'Alois' 289 self.browser.getControl(name="form.middlenames").value = 'Kofi' 290 self.browser.getControl(name="form.lastname").value = 'Bettermann' 290 291 self.browser.getControl(name="form.email").value = 'xx@yy.zz' 291 292 self.browser.getControl("Create application record").click() … … 313 314 self.assertEqual(self.browser.headers['Status'], '200 Ok') 314 315 self.fill_correct_values() 316 # Fire transition 315 317 self.browser.getControl(name="transition").value = ['start'] 316 318 self.browser.getControl("Save").click() … … 319 321 self.browser.open(self.view_path) 320 322 self.assertEqual(self.browser.headers['Status'], '200 Ok') 321 self.browser.open(self.slip_path) 322 self.assertEqual(self.browser.headers['Status'], '200 Ok') 323 self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf') 323 # Change course_admitted 324 324 self.browser.open(self.manage_path) 325 325 self.browser.getControl(name="form.course_admitted").value = [] 326 326 self.browser.getControl("Save").click() 327 self.assertMatches('...Form has been saved...', self.browser.contents) 328 # Change password 329 self.browser.getControl(name="password").value = 'secret' 330 self.browser.getControl(name="control_password").value = 'secre' 331 self.browser.getControl("Save").click() 332 self.assertMatches('...Passwords do not match...', self.browser.contents) 333 self.browser.getControl(name="password").value = 'secret' 334 self.browser.getControl(name="control_password").value = 'secret' 335 self.browser.getControl("Save").click() 336 self.assertMatches('...Form has been saved...', self.browser.contents) 337 # Open pdf slip 327 338 self.browser.open(self.slip_path) 328 339 self.assertEqual(self.browser.headers['Status'], '200 Ok')
Note: See TracChangeset for help on using the changeset viewer.