Changeset 10449 for main/waeup.kofa/trunk/src/waeup/kofa/students/tests
- Timestamp:
- 5 Aug 2013, 06:37:46 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r10279 r10449 190 190 configuration.academic_session = 2004 191 191 configuration.clearance_fee = 3456.0 192 configuration.transcript_fee = 4567.0 192 193 configuration.booking_fee = 123.4 193 194 configuration.maint_fee = 987.0 … … 980 981 self.assertEqual(ac.owner, self.student_id) 981 982 self.assertEqual(ac.cost, 3456.0) 983 984 # Managers can add online transcript payment tickets 985 self.browser.open(self.payments_path + '/addop') 986 self.browser.getControl(name="form.p_category").value = ['transcript'] 987 self.browser.getControl("Create ticket").click() 988 self.assertMatches('...ticket created...', 989 self.browser.contents) 990 991 # Managers can approve the payment 992 self.assertEqual(len(self.app['accesscodes']['TSC-0']),0) 993 ctrl = self.browser.getControl(name='val_id') 994 value = ctrl.options[2] # The clearance payment is the third in the table 995 self.browser.getLink(value).click() 996 self.browser.open(self.browser.url + '/approve') 997 self.assertMatches('...Payment approved...', 998 self.browser.contents) 999 expected = '''... 1000 <td> 1001 <span>Paid</span> 1002 </td>...''' 1003 self.assertMatches(expected,self.browser.contents) 1004 # The new CLR-0 pin has been created 1005 self.assertEqual(len(self.app['accesscodes']['TSC-0']),1) 1006 pin = self.app['accesscodes']['TSC-0'].keys()[0] 1007 ac = self.app['accesscodes']['TSC-0'][pin] 1008 self.assertEqual(ac.owner, self.student_id) 1009 self.assertEqual(ac.cost, 4567.0) 982 1010 return 983 1011
Note: See TracChangeset for help on using the changeset viewer.