- Timestamp:
- 27 Feb 2014, 10:57:32 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/tests/test_browser.py
r11065 r11453 110 110 111 111 # In KwaraPoly only returning students can create school fee payment 112 # without hav eing paid accommodation fee112 # without having paid accommodation fee 113 113 IWorkflowState(self.student).setState('returning') 114 114 configuration = createObject('waeup.SessionConfiguration') … … 464 464 465 465 return 466 467 def test_payment_disabled(self): 468 IWorkflowState(self.student).setState('returning') 469 configuration = createObject('waeup.SessionConfiguration') 470 configuration.academic_session = 2005 471 self.app['configuration'].addSessionConfiguration(configuration) 472 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 473 self.browser.open(self.payments_path) 474 self.browser.getLink("Add current session payment ticket").click() 475 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 476 self.browser.getControl("Create ticket").click() 477 self.assertMatches('...ticket created...', 478 self.browser.contents) 479 self.app['configuration']['2005'].payment_disabled = ['sf_all'] 480 self.browser.getLink("Add current session payment ticket").click() 481 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 482 self.browser.getControl("Create ticket").click() 483 self.assertMatches('...Payment temporarily disabled...', 484 self.browser.contents) 485 self.app['configuration']['2005'].payment_disabled = ['sf_non_pg'] 486 # Non-PG students can't pay ... 487 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 488 self.browser.getControl("Create ticket").click() 489 self.assertMatches('...Payment temporarily disabled...', 490 self.browser.contents) 491 # ... but PG can pay. 492 self.certificate.study_mode = 'pg_ft' 493 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 494 self.browser.getControl("Create ticket").click() 495 self.assertMatches('...ticket created...', 496 self.browser.contents) 497 return
Note: See TracChangeset for help on using the changeset viewer.