- Timestamp:
- 22 Jan 2013, 08:55:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r9755 r9905 92 92 self.browser.open(self.payments_path) 93 93 self.browser.getLink("Add current session payment ticket").click() 94 self.browser.getControl(name="form.p_category").value = ['schoolfee _1']94 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 95 95 self.browser.getControl("Create ticket").click() 96 96 self.assertMatches('...Wrong state...', … … 101 101 self.assertMatches('...Amount could not be determined...', 102 102 self.browser.contents) 103 self.app['configuration']['2004'].school_fee _base= 6666.0104 self.browser.getControl(name="form.p_category").value = ['schoolfee _1']103 self.app['configuration']['2004'].school_fee = 6666.0 104 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 105 105 self.browser.getControl("Create ticket").click() 106 106 self.assertMatches('...ticket created...', … … 119 119 ticket.p_state = 'paid' 120 120 self.browser.open(self.payments_path + '/addop') 121 self.browser.getControl(name="form.p_category").value = ['schoolfee _1']121 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 122 122 self.browser.getControl("Create ticket").click() 123 123 self.assertMatches('...This type of payment has already been made...', … … 151 151 self.assertMatches('...ticket created...', 152 152 self.browser.contents) 153 # Remove all payments so that we can add a school fee payment again 154 keys = [i for i in self.student['payments'].keys()] 155 for payment in keys: 156 del self.student['payments'][payment] 153 154 155 def deactivated_test_for_instalment_payments(self): 156 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 157 self.browser.open(self.payments_path) 157 158 self.browser.open(self.payments_path + '/addop') 158 159 self.browser.getControl(name="form.p_category").value = ['schoolfee_1'] … … 194 195 configuration.academic_session = 2005 195 196 self.app['configuration'].addSessionConfiguration(configuration) 196 self.app['configuration']['2005'].school_ fee_base = 7777.0197 self.app['configuration']['2005'].school_base = 7777.0 197 198 self.browser.open(self.payments_path + '/addop') 198 199 self.browser.getControl(name="form.p_category").value = ['schoolfee_1'] … … 239 240 self.app['configuration']['2004'].maint_fee = 180.0 240 241 self.app['configuration']['2004'].clearance_fee = 1234.0 241 self.app['configuration']['2004'].school_fee _base= 6666.0242 self.app['configuration']['2004'].school_fee = 6666.0 242 243 utils = getUtility(IStudentsUtils) 243 244 … … 245 246 configuration.academic_session = 2005 246 247 self.app['configuration'].addSessionConfiguration(configuration) 247 self.app['configuration']['2005'].school_fee _base= 7777.0248 249 error, payment = utils.setPaymentDetails('schoolfee _1',self.student)248 self.app['configuration']['2005'].school_fee = 7777.0 249 250 error, payment = utils.setPaymentDetails('schoolfee',self.student) 250 251 self.assertEqual(payment, None) 251 252 self.assertEqual(error, u'Wrong state.') 252 253 253 254 IWorkflowState(self.student).setState('cleared') 254 error, payment = utils.setPaymentDetails('schoolfee _1',self.student)255 error, payment = utils.setPaymentDetails('schoolfee',self.student) 255 256 self.assertEqual(payment.p_level, 100) 256 257 self.assertEqual(payment.p_session, 2004) … … 264 265 # ... for returning 265 266 self.app['configuration']['2005'].penalty_ug = 88.0 266 error, payment = utils.setPaymentDetails('schoolfee _1',self.student)267 error, payment = utils.setPaymentDetails('schoolfee',self.student) 267 268 self.assertEqual(payment.amount_auth, 6765.0) 268 269 IWorkflowState(self.student).setState('returning') 269 error, payment = utils.setPaymentDetails('schoolfee _1',self.student)270 error, payment = utils.setPaymentDetails('schoolfee',self.student) 270 271 self.assertEqual(payment.p_level, 200) 271 272 self.assertEqual(payment.p_session, 2005) … … 313 314 return 314 315 315 def test_student_course_registration(self):316 def deactivated_test_student_course_registration(self): 316 317 317 318 # Add more courses
Note: See TracChangeset for help on using the changeset viewer.