Changeset 6631 for main/waeup.sirp/trunk/src/waeup/sirp/students/tests
- Timestamp:
- 26 Aug 2011, 08:00:10 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
r6626 r6631 71 71 setSite(app) 72 72 73 74 # Add student 75 student = Student() 76 student.name = u'Anna Tester' 77 student.student_id = u'Z654321' 78 self.app['students'][student.student_id] = student 79 73 80 self.container_path = 'http://localhost/app/students' 74 81 self.manage_container_path = self.container_path + '/@@manage' 75 82 self.add_student_path = self.container_path + '/addstudent' 83 self.student_path = self.container_path + '/Z654321' 84 self.manage_student_path = self.student_path + '/edit_base' 85 self.clearance_student_path = self.student_path + '/view_clearance' 86 self.personal_student_path = self.student_path + '/view_personal' 87 self.edit_clearance_student_path = self.student_path + '/edit_clearance' 88 self.edit_personal_student_path = self.student_path + '/edit_personal' 76 89 77 90 # Populate university … … 166 179 self.assertTrue('No student found' in self.browser.contents) 167 180 181 class StudentUITests(StudentsFullSetup): 182 # Tests for Student class views and pages 183 184 layer = FunctionalLayer 185 186 def test_manage_access(self): 187 # Managers can access the pages of students 188 # and can perform actions 189 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 190 self.browser.open(self.student_path) 191 self.assertEqual(self.browser.headers['Status'], '200 Ok') 192 self.assertEqual(self.browser.url, self.student_path) 193 self.browser.getLink("Edit base data").click() 194 self.assertEqual(self.browser.headers['Status'], '200 Ok') 195 self.assertEqual(self.browser.url, self.manage_student_path) 196 self.browser.open(self.student_path) 197 self.browser.getLink("View clearance data").click() 198 self.assertEqual(self.browser.headers['Status'], '200 Ok') 199 self.assertEqual(self.browser.url, self.clearance_student_path) 200 self.browser.getLink("Edit clearance data").click() 201 self.assertEqual(self.browser.headers['Status'], '200 Ok') 202 self.assertEqual(self.browser.url, self.edit_clearance_student_path) 203 self.browser.open(self.student_path) 204 self.browser.getLink("View personal data").click() 205 self.assertEqual(self.browser.headers['Status'], '200 Ok') 206 self.assertEqual(self.browser.url, self.personal_student_path) 207 self.browser.getLink("Edit personal data").click() 208 self.assertEqual(self.browser.headers['Status'], '200 Ok') 209 self.assertEqual(self.browser.url, self.edit_personal_student_path) 210 return
Note: See TracChangeset for help on using the changeset viewer.