Changeset 13403 for main/waeup.aaue/trunk/src/waeup/aaue/students
- Timestamp:
- 7 Nov 2015, 06:16:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r13374 r13403 296 296 297 297 def test_student_payments(self): 298 self.certificate.study_mode = 'ug_ft' 299 self.student['studycourse'].entry_session = 2013 300 self.student['studycourse'].certificate.school_fee_1 = 50250.0 301 self.app['configuration']['2004'].union_fee = 1000.0 302 self.app['configuration']['2004'].welfare_fee = 500.0 303 self.student.nationality = u'NG' 298 304 # Login 299 IWorkflowState(self.student).setState(' returning')305 IWorkflowState(self.student).setState('cleared') 300 306 self.browser.open(self.login_path) 301 307 self.browser.getControl(name="form.login").value = self.student_id … … 303 309 self.browser.getControl("Login").click() 304 310 self.browser.open(self.student_path + '/payments') 305 self.assertTrue( 306 'Add current session payment ticket' in self.browser.contents) 307 self.assertFalse( 308 'Add previous session payment ticket' in self.browser.contents) 311 self.browser.getLink("Add current session payment ticket").click() 312 self.browser.getControl(name="form.p_category").value = ['schoolfee_incl'] 313 self.browser.getControl("Create ticket").click() 314 self.assertTrue('ticket created' in self.browser.contents) 315 ctrl = self.browser.getControl(name='val_id') 316 value = ctrl.options[0] 317 self.browser.getLink(value).click() 318 self.assertTrue('Amount Authorized' in self.browser.contents) 319 self.assertEqual(self.student['payments'][value].amount_auth, 51750.0) 320 self.browser.open(self.browser.url + '/payment_slip.pdf') 321 self.assertEqual(self.browser.headers['Status'], '200 Ok') 322 self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf') 323 path = os.path.join(samples_dir(), 'payment_slip.pdf') 324 open(path, 'wb').write(self.browser.contents) 325 print "Sample PDF payment_slip.pdf written to %s" % path 309 326 return 310 327
Note: See TracChangeset for help on using the changeset viewer.