Changeset 9380 for main/waeup.uniben/trunk/src/waeup/uniben/students/tests
- Timestamp:
- 22 Oct 2012, 06:07:58 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py
r9346 r9380 116 116 self.browser.contents) 117 117 118 def test_student_access(self): 119 # Students can edit clearance data 120 IWorkflowState(self.student).setState('clearance started') 121 self.student.clearance_locked = False 122 self.student.nationality = u'NG' 123 file_store = getUtility(IExtFileStore) 124 self.browser.open(self.login_path) 125 self.browser.getControl(name="form.login").value = self.student_id 126 self.browser.getControl(name="form.password").value = 'spwd' 127 self.browser.getControl("Login").click() 128 self.browser.open(self.edit_clearance_path) 129 130 # Clearance can only be requested if all required documents 131 # have been uploaded. 132 self.browser.getControl("Save and request clearance").click() 133 self.assertTrue('No birth certificate uploaded' 134 in self.browser.contents) 135 birth_certificate = 'My birth certificate' 136 file_id = IFileStoreNameChooser(self.student).chooseName( 137 attr="birth_certificate.jpg") 138 file_store.createFile(file_id, StringIO(birth_certificate)) 139 self.browser.open(self.edit_clearance_path) 140 self.browser.getControl("Save and request clearance").click() 141 142 self.assertTrue('No guarantor/referee letter uploaded' 143 in self.browser.contents) 144 ref_let = 'My ref let' 145 file_id = IFileStoreNameChooser(self.student).chooseName( 146 attr="ref_let.jpg") 147 file_store.createFile(file_id, StringIO(ref_let)) 148 self.browser.open(self.edit_clearance_path) 149 self.browser.getControl("Save and request clearance").click() 150 151 self.assertTrue('No acceptance letter uploaded' 152 in self.browser.contents) 153 acc_let = 'My acc let' 154 file_id = IFileStoreNameChooser(self.student).chooseName( 155 attr="acc_let.jpg") 156 file_store.createFile(file_id, StringIO(acc_let)) 157 self.browser.open(self.edit_clearance_path) 158 self.browser.getControl("Save and request clearance").click() 159 160 self.assertTrue('No first sitting result uploaded' 161 in self.browser.contents) 162 fst_sit_scan = 'My first sitting result' 163 file_id = IFileStoreNameChooser(self.student).chooseName( 164 attr="fst_sit_scan.jpg") 165 file_store.createFile(file_id, StringIO(fst_sit_scan)) 166 self.browser.open(self.edit_clearance_path) 167 self.browser.getControl("Save and request clearance").click() 168 169 self.assertTrue('No second sitting result uploaded' 170 in self.browser.contents) 171 scd_sit_scan = 'My second sitting result' 172 file_id = IFileStoreNameChooser(self.student).chooseName( 173 attr="scd_sit_scan.jpg") 174 file_store.createFile(file_id, StringIO(scd_sit_scan)) 175 self.browser.open(self.edit_clearance_path) 176 self.browser.getControl("Save and request clearance").click() 177 178 self.assertTrue('No affidavit of non-menbership of secret cults uploaded' 179 in self.browser.contents) 180 secr_cults = 'My non-membership scan' 181 file_id = IFileStoreNameChooser(self.student).chooseName( 182 attr="secr_cults.jpg") 183 file_store.createFile(file_id, StringIO(secr_cults)) 184 self.browser.open(self.edit_clearance_path) 185 self.browser.getControl("Save and request clearance").click() 186 187 self.assertTrue('Clearance has been requested' 188 in self.browser.contents) 189 118 190 def test_manage_payments(self): 119 191 # Add missing configuration data
Note: See TracChangeset for help on using the changeset viewer.