- Timestamp:
- 26 Apr 2020, 09:22:35 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/tests/test_browser.py
r15947 r16075 85 85 layer = FunctionalLayer 86 86 87 def test_application_slip(self): 87 def fill_correct_values(self): 88 # Fill the edit form with suitable values 89 self.browser.getControl(name="form.firstname").value = 'John' 90 self.browser.getControl(name="form.middlename").value = 'Anthony' 91 self.browser.getControl(name="form.lastname").value = 'Tester' 92 self.browser.getControl(name="custom.course1").value = ['CERT1'] 93 self.browser.getControl(name="form.date_of_birth").value = '09/09/1988' 94 self.browser.getControl(name="form.sex").value = ['m'] 95 self.browser.getControl(name="form.email").value = 'xx@yy.zz' 96 97 def test_manage_application(self): 88 98 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 89 99 self.slip_path = self.view_path + '/application_slip.pdf' … … 92 102 self.fill_correct_values() 93 103 self.browser.getControl("Save").click() 104 self.assertEqual(self.applicant.course1, self.certificate) 105 self.assertEqual(self.applicant.course2, None) 94 106 IWorkflowState(self.applicant).setState('submitted') 95 107 self.browser.open(self.manage_path) … … 101 113 open(path, 'wb').write(self.browser.contents) 102 114 print "Sample application_slip.pdf written to %s" % path 115 # Log entries have been added 116 logfile = os.path.join( 117 self.app['datacenter'].storage, 'logs', 'applicants.log') 118 logcontent = open(logfile).read() 119 self.assertTrue( 120 'zope.mgr - kofacustom.iuokada.applicants.browser.CustomApplicantManageFormPage - ' 121 '%s - saved: firstname + middlename + lastname + date_of_birth ' 122 '+ sex + email + course1' 123 % (self.applicant.applicant_id) 124 in logcontent) 103 125 104 126 def test_upload_res_stat_by_manager(self):
Note: See TracChangeset for help on using the changeset viewer.