Changeset 8267 for main/waeup.uniben/trunk/src/waeup/uniben/students/tests
- Timestamp:
- 24 Apr 2012, 21:30:43 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py
r8265 r8267 113 113 self.assertMatches('...First Sitting Record...', 114 114 self.browser.contents) 115 # Managers can open clearance slip of ug students 116 self.browser.open(self.student_path + '/clearance.pdf') 117 self.assertEqual(self.browser.headers['Status'], '200 Ok') 118 self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf') 115 119 # There is no pg field in the clearance form 116 120 self.assertFalse('Second Higher Education Record' … … 125 129 self.assertMatches('...First Sitting Record...', 126 130 self.browser.contents) 131 # Managers can open clearance slip of pg students 132 self.browser.open(self.student_path + '/clearance.pdf') 133 self.assertEqual(self.browser.headers['Status'], '200 Ok') 134 self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf') 127 135 128 136 def test_manage_payments(self): … … 150 158 self.assertMatches('...Amount Authorized...', 151 159 self.browser.contents) 160 # Managers can open payment slip 161 self.browser.getLink("Download payment slip").click() 162 self.assertEqual(self.browser.headers['Status'], '200 Ok') 163 self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf') 152 164 # Set ticket paid 153 165 ticket = self.student['payments'].items()[0][1] … … 198 210 self.assertMatches('...Session configuration object is not...', 199 211 self.browser.contents) 212 213 def test_student_access(self): 214 # Students can edit clearance data 215 IWorkflowState(self.student).setState('cleared') 216 self.student.clearance_locked = False 217 self.browser.open(self.login_path) 218 self.browser.getControl(name="form.login").value = self.student_id 219 self.browser.getControl(name="form.password").value = 'spwd' 220 self.browser.getControl("Login").click() 221 # Student can view and edit clearance data 222 self.browser.getLink("Clearance Data").click() 223 self.browser.getLink("Edit").click() 224 self.assertTrue('Save' in self.browser.contents) 225 226
Note: See TracChangeset for help on using the changeset viewer.