- Timestamp:
- 4 Sep 2012, 11:18:20 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.fceokene/trunk/src/waeup/fceokene/students/tests/test_browser.py
r9153 r9156 20 20 import tempfile 21 21 from StringIO import StringIO 22 from hurry.workflow.interfaces import IWorkflowState 22 from hurry.workflow.interfaces import IWorkflowState, IWorkflowInfo 23 23 from zope.component.hooks import setSite, clearSite 24 24 from zope.component import getUtility, createObject 25 25 from zope.interface import verify 26 26 from waeup.kofa.app import University 27 from waeup.kofa.students.tests.test_browser import StudentsFullSetup 27 from waeup.kofa.students.tests.test_browser import ( 28 StudentsFullSetup, SAMPLE_IMAGE) 28 29 from waeup.kofa.testing import FunctionalTestCase 29 30 from waeup.kofa.interfaces import ( … … 247 248 self.assertEqual(error, u'Previous session payment not yet implemented.') 248 249 return 250 251 def test_student_start_clearance(self): 252 self.browser.open(self.login_path) 253 self.browser.getControl(name="form.login").value = self.student_id 254 self.browser.getControl(name="form.password").value = 'spwd' 255 self.browser.getControl("Login").click() 256 257 IWorkflowInfo(self.student).fireTransition('admit') 258 self.browser.open(self.student_path + '/change_portrait') 259 image = open(SAMPLE_IMAGE, 'rb') 260 ctrl = self.browser.getControl(name='passportuploadedit') 261 file_ctrl = ctrl.mech_control 262 file_ctrl.add_file(image, filename='my_photo.jpg') 263 self.browser.getControl( 264 name='upload_passportuploadedit').click() 265 self.browser.open(self.student_path + '/start_clearance') 266 # In Okene the students can just start clearance without entering 267 # an activation code. 268 self.browser.getControl("Start clearance now").click() 269 self.assertMatches('...Clearance process has been started...', 270 self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.