- Timestamp:
- 6 Nov 2012, 20:46:03 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/tests/test_browser.py
r9562 r9564 186 186 self.assertEqual(self.browser.headers['Status'], '200 Ok') 187 187 self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf') 188 # Managers can edit personal data. No fields are required. 189 self.browser.open(self.manage_personal_path) 190 self.browser.getControl("Save").click() 191 self.assertMatches('...Form has been saved...', 192 self.browser.contents) 188 193 189 194 def test_student_access(self): … … 226 231 self.browser.getControl("Save and request clearance").click() 227 232 self.assertMatches('...Clearance has been requested...', 233 self.browser.contents) 234 235 # Students can edit personal data. Some fields are required. 236 self.browser.open(self.personal_path) 237 self.assertTrue('Updated' in self.browser.contents) 238 self.browser.getLink("Edit").click() 239 self.assertEqual(self.browser.headers['Status'], '200 Ok') 240 self.assertEqual(self.browser.url, self.edit_personal_path) 241 self.browser.getControl("Save").click() 242 self.assertMatches('...Required input is missing...', 243 self.browser.contents) 244 self.browser.getControl(name="form.perm_address").value = 'My address!' 245 self.browser.getControl("Save").click() 246 self.assertMatches('...Required input is missing...', 247 self.browser.contents) 248 # Ok, let's give up and fill the rest. 249 self.browser.getControl(name="form.next_kin_name").value = 'My Mutti' 250 self.browser.getControl(name="form.next_kin_relation").value = 'mother' 251 self.browser.getControl(name="form.next_kin_address").value = 'sweet home' 252 self.browser.getControl("Save").click() 253 self.assertMatches('...Form has been saved...', 228 254 self.browser.contents) 229 255
Note: See TracChangeset for help on using the changeset viewer.