- Timestamp:
- 7 Apr 2016, 14:21:25 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/applicants/tests/test_browser.py
r13615 r13814 1 # -*- coding: utf-8 -*- 1 2 ## $Id$ 2 3 ## … … 225 226 open(path, 'wb').write(self.browser.contents) 226 227 print "Sample nils_application_slip.pdf written to %s" % path 228 229 def test_ictwk_application_slip(self): 230 231 # Remove required FieldProperty attribute first ... 232 #delattr(ApplicantsContainer, 'prefix') 233 # ... and replace by ictw 234 self.applicantscontainer.prefix = 'ictwk' 235 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 236 self.slip_path = self.view_path + '/application_slip.pdf' 237 self.browser.open(self.manage_path) 238 self.assertEqual(self.browser.headers['Status'], '200 Ok') 239 self.browser.getControl(name="form.firstname").value = 'John' 240 self.browser.getControl(name="form.middlename").value = 'Anthony' 241 self.browser.getControl(name="form.lastname").value = 'Tester' 242 self.browser.getControl(name="form.date_of_birth").value = '09/09/1988' 243 #self.browser.getControl(name="form.sex").value = ['m'] 244 self.browser.getControl(name="form.email").value = 'xx@yy.zz' 245 self.browser.getControl("Save").click() 246 self.applicant.registration_cats = ['group', 'corporate'] 247 IWorkflowState(self.applicant).setState('submitted') 248 self.browser.open(self.view_path) 249 self.assertTrue('Group Registration @ ₦ 200000' in self.browser.contents) 250 self.browser.open(self.manage_path) 251 self.browser.getLink("Download application slip").click() 252 self.assertEqual(self.browser.headers['Status'], '200 Ok') 253 self.assertEqual(self.browser.headers['Content-Type'], 254 'application/pdf') 255 path = os.path.join(samples_dir(), 'ictwk_application_slip.pdf') 256 open(path, 'wb').write(self.browser.contents) 257 print "Sample ictwk_application_slip.pdf written to %s" % path
Note: See TracChangeset for help on using the changeset viewer.