Changeset 7133 for main/waeup.sirp/trunk/src/waeup/sirp/students/tests
- Timestamp:
- 18 Nov 2011, 08:48:22 (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/sample_student_data.csv
r6844 r7133 1 firstname,lastname,fullname,reg_number,date_of_birth,matric_number 2 Aaren,Pieri,Aaren Pieri,1,1990-01-02,100000 3 Aaren,Finau,Aaren Finau,2,1990-01-03,100001 4 Aaren,Berson,Aaren Berson,3,1990-01-04,100002 1 firstname,lastname,fullname,reg_number,date_of_birth,matric_number,email,phone 2 Aaren,Pieri,Aaren Pieri,1,1990-01-02,100000,aa@aa.ng,1234 3 Aaren,Finau,Aaren Finau,2,1990-01-03,100001,aa@aa.ng,1234 4 Aaren,Berson,Aaren Berson,3,1990-01-04,100002,aa@aa.ng,1234 -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
r7127 r7133 91 91 student.matric_number = u'234' 92 92 student.sex = u'm' 93 student.email = 'aa@aa.ng' 94 student.phone = 1234 93 95 self.app['students'].addStudent(student) 94 96 self.student_id = student.student_id … … 104 106 self.add_student_path = self.container_path + '/addstudent' 105 107 self.student_path = self.container_path + '/' + self.student_id 106 self.manage_student_path = self.student_path + '/ edit_base'108 self.manage_student_path = self.student_path + '/manage_base' 107 109 self.clearance_student_path = self.student_path + '/view_clearance' 108 110 self.personal_student_path = self.student_path + '/view_personal' … … 584 586 # Prepare a csv file for students 585 587 open('students.csv', 'wb').write( 586 """firstname,lastname,fullname,reg_number,date_of_birth,matric_number 587 Aaren,Pieri,Aaren Pieri,1,1990-01-02,100000 588 Claus,Finau,Claus Finau,2,1990-01-03,100001 589 Brit,Berson,Brit Berson,3,1990-01-04,100001 588 """firstname,lastname,fullname,reg_number,date_of_birth,matric_number,email,phone 589 Aaren,Pieri,Aaren Pieri,1,1990-01-02,100000,aa@aa.ng,1234 590 Claus,Finau,Claus Finau,2,1990-01-03,100001,aa@aa.ng,1234 591 Brit,Berson,Brit Berson,3,1990-01-04,100001,aa@aa.ng,1234 590 592 """) 591 593 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') … … 757 759 self.browser.getLink("Clearance Data").click() 758 760 self.browser.getLink("Start clearance").click() 761 self.student.email = None 762 # Uups, we forgot to fill the email fields 763 self.browser.getControl("Start clearance").click() 764 self.assertMatches('...Not all required fields filled...', 765 self.browser.contents) 766 self.student.email = 'aa@aa.ng' 767 self.browser.open(self.student_path + '/start_clearance') 759 768 self.browser.getControl(name="ac_series").value = '3' 760 769 self.browser.getControl(name="ac_number").value = '4444444' … … 923 932 ac = self.app['accesscodes']['CLR-0'][pin] 924 933 ac.owner = self.student_id 925 # The new CLR-0 pin can be used for starting clearance926 IWorkflowInfo(self.student).fireTransition('admit')927 self.browser.open(self.student_path + '/start_clearance')928 parts = pin.split('-')[1:]929 clrseries, clrnumber = parts930 self.browser.getControl(name="ac_series").value = clrseries931 self.browser.getControl(name="ac_number").value = clrnumber932 self.browser.getControl("Start clearance now").click()933 self.assertMatches('...Clearance process has been started...',934 self.browser.contents)935 934 return 936 935 … … 975 974 976 975 # The new CLR-0 pin can be used for starting clearance 976 # but they have to upload a passport picture first 977 # which is only possible in state admitted 978 self.browser.open(self.student_path + '/change_portrait') 979 self.assertMatches('...form is locked...', 980 self.browser.contents) 977 981 IWorkflowInfo(self.student).fireTransition('admit') 982 self.browser.open(self.student_path + '/change_portrait') 983 pseudo_image = StringIO('I pretend to be a graphics file') 984 ctrl = self.browser.getControl(name='passportuploadedit') 985 file_ctrl = ctrl.mech_control 986 file_ctrl.add_file(pseudo_image, filename='my_photo.jpg') 987 self.browser.getControl( 988 name='upload_passportuploadedit').click() 978 989 self.browser.open(self.student_path + '/start_clearance') 979 990 parts = pin.split('-')[1:]
Note: See TracChangeset for help on using the changeset viewer.