Changeset 11597 for main/waeup.aaue/trunk/src/waeup/aaue/students/tests
- Timestamp:
- 23 Apr 2014, 10:29:32 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r11596 r11597 18 18 import shutil 19 19 import tempfile 20 import grok 21 from mechanize import LinkNotFoundError 20 22 from hurry.workflow.interfaces import IWorkflowState 21 23 from zope.component.hooks import setSite, clearSite … … 332 334 return 333 335 334 336 def test_set_matric_number(self): 337 # Login as student 338 self.browser.open(self.login_path) 339 #IWorkflowState(self.student).setState('school fee paid') 340 self.browser.open(self.login_path) 341 self.browser.getControl(name="form.login").value = self.student_id 342 self.browser.getControl(name="form.password").value = 'spwd' 343 self.browser.getControl("Login").click() 344 self.assertRaises( 345 LinkNotFoundError, 346 self.browser.getLink, 'Get Matriculation Number') 347 self.student.matric_number = None 348 site = grok.getSite() 349 site['configuration'].next_matric_integer = 1 350 self.student['studycourse'].certificate.study_mode = 'ug_pt' 351 self.browser.open(self.student_path) 352 self.browser.getLink("Get Matriculation Number").click() 353 self.assertTrue('Matriculation number PTP/fac1/dep1/04/00001 assigned.' 354 in self.browser.contents) 355 self.assertEqual(self.student.matric_number, 'PTP/fac1/dep1/04/00001') 356 self.assertRaises( 357 LinkNotFoundError, 358 self.browser.getLink, 'Get Matriculation Number') 359 return 360
Note: See TracChangeset for help on using the changeset viewer.