- Timestamp:
- 8 Apr 2016, 05:26:51 (9 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben/applicants/tests
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/applicants/tests/test_browser.py
r13814 r13816 30 30 from waeup.uniben.configuration import CustomSessionConfiguration 31 31 from waeup.kofa.applicants.tests.test_browser import ApplicantsFullSetup, PH_LEN 32 33 session_1 = datetime.now().year - 2 34 SAMPLE_IMAGE = os.path.join(os.path.dirname(__file__), 'test_image.jpg') 32 35 33 36 class CustomApplicantUITests(ApplicantsFullSetup): … … 227 230 print "Sample nils_application_slip.pdf written to %s" % path 228 231 229 def test_ictwk_application _slip(self):232 def test_ictwk_application(self): 230 233 231 234 # Remove required FieldProperty attribute first ... … … 243 246 #self.browser.getControl(name="form.sex").value = ['m'] 244 247 self.browser.getControl(name="form.email").value = 'xx@yy.zz' 248 image = open(SAMPLE_IMAGE, 'rb') 249 ctrl = self.browser.getControl(name='form.passport') 250 file_ctrl = ctrl.mech_control 251 file_ctrl.add_file(image, filename='myphoto.jpg') 245 252 self.browser.getControl("Save").click() 246 253 self.applicant.registration_cats = ['group', 'corporate'] 254 IWorkflowState(self.applicant).setState('started') 255 configuration = CustomSessionConfiguration() 256 configuration.academic_session = session_1 257 configuration.application_fee = 0.0 258 self.app['configuration'].addSessionConfiguration(configuration) 259 self.browser.getControl("Add online payment ticket").click() 260 self.assertMatches('...Payment ticket created...', 261 self.browser.contents) 262 self.assertEqual(self.applicant.values()[0].amount_auth, 450000) 247 263 IWorkflowState(self.applicant).setState('submitted') 248 264 self.browser.open(self.view_path)
Note: See TracChangeset for help on using the changeset viewer.