- Timestamp:
- 30 Oct 2013, 19:43:48 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/tests/test_browser.py
r10672 r10675 104 104 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 105 105 self.browser.getControl("Create ticket").click() 106 107 self.assertMatches('...Book and pay for accommodation first...', 108 self.browser.contents) 109 110 # In KwaraPoly only returning students can create school fee payment 111 # without haveing paid accommodation fee 112 IWorkflowState(self.student).setState('returning') 113 configuration = createObject('waeup.SessionConfiguration') 114 configuration.academic_session = 2005 115 self.app['configuration'].addSessionConfiguration(configuration) 116 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 117 self.browser.getControl("Create ticket").click() 106 118 self.assertMatches('...ticket created...', 107 119 self.browser.contents) … … 155 167 self.browser.open(self.payments_path + '/addop') 156 168 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 157 self.browser.getControl("Create ticket").click()158 self.assertMatches('...ticket created...',159 self.browser.contents)160 # In state returning we can add a new school fee ticket since161 # p_session and p_level is different162 IWorkflowState(self.student).setState('returning')163 self.browser.open(self.payments_path + '/addop')164 self.browser.getControl(name="form.p_category").value = ['schoolfee']165 self.browser.getControl("Create ticket").click()166 # Uups, we forgot to add a session configuration for next session167 self.assertTrue('Session configuration object is not available.'168 in self.browser.contents)169 configuration = createObject('waeup.SessionConfiguration')170 configuration.academic_session = 2005171 self.app['configuration'].addSessionConfiguration(configuration)172 169 self.browser.getControl("Create ticket").click() 173 170 self.assertMatches('...ticket created...', … … 222 219 self.assertEqual(pt_ft(self.student), 'ft') 223 220 221 error, payment = utils.setPaymentDetails('schoolfee',self.student) 222 self.assertEqual(error, 223 'Book and pay for accommodation first before making' 224 ' school fee payments.') 225 # We add a fake maint. payment ticket to meet the condition 226 maint_payment = createObject('waeup.StudentOnlinePayment') 227 self.student['payments']['any_key'] = maint_payment 228 maint_payment.p_category = 'hostel_maintenance' 229 maint_payment.p_state = 'paid' 230 maint_payment.p_session = 2004 224 231 error, payment = utils.setPaymentDetails('schoolfee',self.student) 225 232 self.assertEqual(payment.p_level, 100)
Note: See TracChangeset for help on using the changeset viewer.