Changeset 8961 for main/waeup.aaue/trunk/src/waeup/aaue/students/tests
- Timestamp:
- 9 Jul 2012, 14:41:08 (13 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue
- Property svn:mergeinfo changed
/main/waeup.uniben/trunk/src/waeup/uniben merged: 8959
- Property svn:mergeinfo changed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r8909 r8961 177 177 self.browser.getControl(name="form.p_category").value = ['schoolfee_1'] 178 178 self.browser.getControl("Create ticket").click() 179 self.assertMatches('...ticket created...', 180 self.browser.contents) 181 179 self.assertMatches('...Session configuration object is not...', 180 self.browser.contents) 181 # Uups, we forgot to add a session configuration for next session 182 configuration = createObject('waeup.SessionConfiguration') 183 configuration.academic_session = 2005 184 self.app['configuration'].addSessionConfiguration(configuration) 185 self.app['configuration']['2005'].school_fee_base = 7777.0 186 self.browser.open(self.payments_path + '/addop') 187 self.browser.getControl(name="form.p_category").value = ['schoolfee_1'] 188 self.browser.getControl("Create ticket").click() 189 self.assertMatches('...ticket created...', 190 self.browser.contents) 182 191 # If the session configuration doesn't exist an error message will 183 192 # be shown. No other requirement is being checked. … … 208 217 utils = getUtility(IStudentsUtils) 209 218 219 configuration = createObject('waeup.SessionConfiguration') 220 configuration.academic_session = 2005 221 self.app['configuration'].addSessionConfiguration(configuration) 222 self.app['configuration']['2005'].school_fee_base = 7777.0 223 210 224 error, payment = utils.setPaymentDetails('schoolfee_1',self.student) 211 225 self.assertEqual(payment, None) … … 220 234 self.assertEqual(error, None) 221 235 222 # Add penalty fee. 236 # Add penalty fee ... 237 # ... for cleared 223 238 self.app['configuration']['2004'].penalty_ug = 99.0 239 # ... for returning 240 self.app['configuration']['2005'].penalty_ug = 88.0 224 241 error, payment = utils.setPaymentDetails('schoolfee_1',self.student) 225 242 self.assertEqual(payment.amount_auth, 6765.0) 226 227 243 IWorkflowState(self.student).setState('returning') 228 244 error, payment = utils.setPaymentDetails('schoolfee_1',self.student) 229 245 self.assertEqual(payment.p_level, 200) 230 246 self.assertEqual(payment.p_session, 2005) 231 self.assertEqual(payment.amount_auth, 6765.0)247 self.assertEqual(payment.amount_auth, 7865.0) 232 248 self.assertEqual(payment.p_item, u'CERT1') 233 249 self.assertEqual(error, None)
Note: See TracChangeset for help on using the changeset viewer.