Changeset 6635 for main/waeup.sirp/trunk/src/waeup/sirp/students/tests
- Timestamp:
- 26 Aug 2011, 20:54:25 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/students/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
r6632 r6635 72 72 73 73 74 # Add student 74 # Add student with subobjects (done by addStudent) 75 75 student = Student() 76 76 student.name = u'Anna Tester' 77 77 student.student_id = u'Z654321' 78 self.app['students'] [student.student_id] = student78 self.app['students'].addStudent(student) 79 79 80 80 self.container_path = 'http://localhost/app/students' … … 88 88 self.edit_personal_student_path = self.student_path + '/edit_personal' 89 89 90 self.studycourse_student_path = self.student_path + '/studycourse' 91 self.payments_student_path = self.student_path + '/payments' 92 self.accommodation_student_path = self.student_path + '/accommodation' 93 90 94 # Populate university 91 95 certificate = createObject('waeup.Certificate') … … 188 192 # and can perform actions 189 193 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 194 190 195 self.browser.open(self.student_path) 191 196 self.assertEqual(self.browser.headers['Status'], '200 Ok') 192 197 self.assertEqual(self.browser.url, self.student_path) 193 self.browser.getLink("Edit base data").click()198 self.browser.getLink("Edit").click() 194 199 self.assertEqual(self.browser.headers['Status'], '200 Ok') 195 200 self.assertEqual(self.browser.url, self.manage_student_path) 196 self.browser.open(self.student_path) 197 self.browser.getLink("View clearance data").click() 201 202 self.browser.open(self.student_path) 203 self.browser.getLink("Clearance Data").click() 198 204 self.assertEqual(self.browser.headers['Status'], '200 Ok') 199 205 self.assertEqual(self.browser.url, self.clearance_student_path) 200 self.browser.getLink("Edit clearance data").click()206 self.browser.getLink("Edit").click() 201 207 self.assertEqual(self.browser.headers['Status'], '200 Ok') 202 208 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() 209 210 self.browser.open(self.student_path) 211 self.browser.getLink("Personal Data").click() 205 212 self.assertEqual(self.browser.headers['Status'], '200 Ok') 206 213 self.assertEqual(self.browser.url, self.personal_student_path) 207 self.browser.getLink("Edit personal data").click()214 self.browser.getLink("Edit").click() 208 215 self.assertEqual(self.browser.headers['Status'], '200 Ok') 209 216 self.assertEqual(self.browser.url, self.edit_personal_student_path) 217 218 self.browser.open(self.student_path) 219 self.browser.getLink("Study Course").click() 220 self.assertEqual(self.browser.headers['Status'], '200 Ok') 221 self.assertEqual(self.browser.url, self.studycourse_student_path) 222 223 self.browser.open(self.student_path) 224 self.browser.getLink("Payments").click() 225 self.assertEqual(self.browser.headers['Status'], '200 Ok') 226 self.assertEqual(self.browser.url, self.payments_student_path) 227 228 self.browser.open(self.student_path) 229 self.browser.getLink("Accommodation").click() 230 self.assertEqual(self.browser.headers['Status'], '200 Ok') 231 self.assertEqual(self.browser.url, self.accommodation_student_path) 232 210 233 return -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_student.py
r6633 r6635 30 30 Student, StudentFactory, 31 31 ) 32 from waeup.sirp.students.studycourse import (33 StudentStudyCourse, 34 ) 32 from waeup.sirp.students.studycourse import StudentStudyCourse 33 from waeup.sirp.students.payments import StudentPayments 34 from waeup.sirp.students.accommodation import StudentAccommodation 35 35 from waeup.sirp.students.interfaces import ( 36 IStudent, IStudentStudyCourse, 36 IStudent, IStudentStudyCourse, IStudentPayments, IStudentAccommodation, 37 37 ) 38 38 from waeup.sirp.testing import FunctionalLayer … … 46 46 self.student = Student() 47 47 self.studycourse = StudentStudyCourse() 48 self.payments = StudentPayments() 49 self.accommodation = StudentAccommodation() 48 50 return 49 51 … … 57 59 verify.verifyClass(IStudentStudyCourse, StudentStudyCourse) 58 60 verify.verifyObject(IStudentStudyCourse, self.studycourse) 61 verify.verifyClass(IStudentPayments, StudentPayments) 62 verify.verifyObject(IStudentPayments, self.payments) 63 verify.verifyClass(IStudentAccommodation, StudentAccommodation) 64 verify.verifyObject(IStudentAccommodation, self.accommodation) 59 65 return 60 66
Note: See TracChangeset for help on using the changeset viewer.