Changeset 9527 for main/waeup.aaue/trunk/src
- Timestamp:
- 4 Nov 2012, 20:12:59 (12 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/students
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r9504 r9527 85 85 self.app['configuration']['2004'].gown_fee = 150.0 86 86 self.app['configuration']['2004'].transfer_fee = 90.0 87 #self.app['configuration']['2004'].clearance_fee = 120.088 87 self.app['configuration']['2004'].booking_fee = 150.0 89 88 self.app['configuration']['2004'].maint_fee = 180.0 … … 92 91 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 93 92 self.browser.open(self.payments_path) 94 self.browser.get Control("Add onlinepayment ticket").click()93 self.browser.getLink("Add current session payment ticket").click() 95 94 self.browser.getControl("Create ticket").click() 96 95 self.assertMatches('...Wrong state...', … … 101 100 self.assertMatches('...Amount could not be determined...', 102 101 self.browser.contents) 103 104 102 self.app['configuration']['2004'].school_fee_base = 6666.0 105 106 self.browser.getControl("Add online payment ticket").click()107 103 self.browser.getControl("Create ticket").click() 108 104 self.assertMatches('...ticket created...', … … 169 165 self.browser.contents) 170 166 # Ok, then we approve the first instalment ... 167 self.browser.open(self.payments_path) 171 168 ctrl = self.browser.getControl(name='val_id') 172 169 p_id = ctrl.options[0] … … 204 201 del self.app['configuration']['2004'] 205 202 self.browser.open(self.payments_path) 206 self.browser.get Control("Add onlinepayment ticket").click()203 self.browser.getLink("Add current session payment ticket").click() 207 204 self.browser.getControl("Create ticket").click() 208 205 self.assertMatches('...Session configuration object is not...', 209 206 self.browser.contents) 207 208 def test_student_payments(self): 209 # Login 210 IWorkflowState(self.student).setState('returning') 211 self.browser.open(self.login_path) 212 self.browser.getControl(name="form.login").value = self.student_id 213 self.browser.getControl(name="form.password").value = 'spwd' 214 self.browser.getControl("Login").click() 215 self.browser.open(self.student_path + '/payments') 216 self.assertTrue( 217 'Add current session payment ticket' in self.browser.contents) 218 self.assertFalse( 219 'Add previous session payment ticket' in self.browser.contents) 220 return 210 221 211 222 def test_get_returning_data(self): -
main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py
r9154 r9527 63 63 p_level = student['studycourse'].current_level 64 64 p_current = True 65 session = str(p_session) 66 try: 67 academic_session = grok.getSite()['configuration'][session] 68 except KeyError: 65 academic_session = self._getSessionConfiguration(p_session) 66 if academic_session == None: 69 67 return _(u'Session configuration object is not available.'), None 70 68 # Determine fee. … … 94 92 elif student.state == RETURNING or\ 95 93 (student.is_postgrad and student.state == PAID): 94 academic_session = self._getSessionConfiguration(p_session) 95 if academic_session == None: 96 return _(u'Session configuration object is not available.'), None 96 97 if student.state == RETURNING: 97 98 p_session, p_level = self.getReturningData(student)
Note: See TracChangeset for help on using the changeset viewer.