Changeset 7995 for main/waeup.custom/trunk/src/waeup/custom/students/tests
- Timestamp:
- 28 Mar 2012, 06:23:25 (13 years ago)
- Location:
- main/waeup.custom/trunk/src/waeup/custom/students/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.custom/trunk/src/waeup/custom/students/tests/sample_student_data.csv
r7894 r7995 1 firstname,lastname,reg_number,date_of_birth,matric_number,email,phone, lga,nationality2 Aaren,Pieri,1, 1990-01-02,100000,aa@aa.ng,12343 Aaren,Finau,2, 1990-01-03,100001,aa@aa.ng,12344 Aaren,Berson,3, 1990-01-04,100002,aa@aa.ng,12341 firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,sex 2 Aaren,Pieri,1,,100000,aa@aa.ng,1234,m 3 Aaren,Finau,2,,100001,aa@aa.ng,1234,m 4 Aaren,Berson,3,,100002,aa@aa.ng,1234,m -
main/waeup.custom/trunk/src/waeup/custom/students/tests/test_browser.py
r7934 r7995 72 72 73 73 def test_import(self): 74 # We added empty columns 'nationality' and 'lga' tothe import file.75 # The original processor will fail because these fields arerequired74 # We have an empty column 'date_of_birth' in the import file. 75 # The original processor will fail because 'date_of_birth' is required 76 76 # in the base package. 77 77 num, num_warns, fin_file, fail_file = self.processor_base.doImport( … … 79 79 self.assertEqual(num_warns,3) 80 80 assert len(self.app['students'].keys()) == 0 81 # The customized processor does not complain since both fields are81 # The customized processor does not complain since 'date_of_birth' is 82 82 # not required in the custom package. 83 83 num, num_warns, fin_file, fail_file = self.processor.doImport( 84 84 self.csv_file, STUDENT_HEADER_FIELDS) 85 #print open(fail_file).read() 85 86 self.assertEqual(num_warns,0) 86 87 assert len(self.app['students'].keys()) == 3 … … 103 104 # Managers can add online payment tickets 104 105 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 105 self.browser.open(self.payments_ student_path)106 self.browser.open(self.payments_path) 106 107 self.browser.getControl("Add online payment ticket").click() 107 108 self.browser.getControl("Create ticket").click() … … 109 110 self.browser.contents) 110 111 IWorkflowState(self.student).setState('cleared') 111 self.browser.open(self.payments_ student_path + '/addop')112 self.browser.open(self.payments_path + '/addop') 112 113 self.browser.getControl("Create ticket").click() 113 114 self.assertMatches('...ticket created...', … … 122 123 ticket.p_state = 'paid' 123 124 IWorkflowState(self.student).setState('returning') 124 self.browser.open(self.payments_ student_path + '/addop')125 self.browser.open(self.payments_path + '/addop') 125 126 self.browser.getControl("Create ticket").click() 126 127 self.assertMatches('...This type of payment has already been made...', … … 130 131 for payment in keys: 131 132 del self.student['payments'][payment] 132 self.browser.open(self.payments_ student_path + '/addop')133 self.browser.open(self.payments_path + '/addop') 133 134 self.browser.getControl("Create ticket").click() 134 135 self.assertMatches('...ticket created...', 135 136 self.browser.contents) 136 self.browser.open(self.payments_ student_path + '/addop')137 self.browser.open(self.payments_path + '/addop') 137 138 self.browser.getControl(name="form.p_category").value = ['gown'] 138 139 self.browser.getControl("Create ticket").click() 139 self.browser.open(self.payments_ student_path + '/addop')140 self.browser.open(self.payments_path + '/addop') 140 141 self.browser.getControl(name="form.p_category").value = ['transfer'] 141 142 self.browser.getControl("Create ticket").click() 142 self.browser.open(self.payments_ student_path + '/addop')143 self.browser.open(self.payments_path + '/addop') 143 144 self.browser.getControl( 144 145 name="form.p_category").value = ['bed_allocation'] 145 146 self.browser.getControl("Create ticket").click() 146 self.browser.open(self.payments_ student_path + '/addop')147 self.browser.open(self.payments_path + '/addop') 147 148 self.browser.getControl( 148 149 name="form.p_category").value = ['hostel_maintenance'] 149 150 self.browser.getControl("Create ticket").click() 150 self.browser.open(self.payments_ student_path + '/addop')151 self.browser.open(self.payments_path + '/addop') 151 152 self.browser.getControl(name="form.p_category").value = ['clearance'] 152 153 self.browser.getControl("Create ticket").click() 153 154 self.certificate.study_mode = 'ug_pt' 154 self.browser.open(self.payments_ student_path + '/addop')155 self.browser.open(self.payments_path + '/addop') 155 156 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 156 157 self.browser.getControl("Create ticket").click() … … 161 162 # be shown 162 163 del self.app['configuration']['2004'] 163 self.browser.open(self.payments_ student_path)164 self.browser.open(self.payments_path) 164 165 self.browser.getControl("Add online payment ticket").click() 165 166 self.browser.getControl("Create ticket").click() 166 167 self.assertMatches('...Session configuration object is not...', 167 168 self.browser.contents) 168 169
Note: See TracChangeset for help on using the changeset viewer.