Changeset 7293
- Timestamp:
- 6 Dec 2011, 19:54:38 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/students/tests
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
r7280 r7293 23 23 from StringIO import StringIO 24 24 from datetime import datetime 25 import os 25 26 import grok 26 27 from zope.event import notify … … 871 872 # Student can upload a passport picture 872 873 self.browser.open(self.student_path + '/change_portrait') 873 pseudo_image = StringIO('I pretend to be a graphics file')874 874 ctrl = self.browser.getControl(name='passportuploadedit') 875 file_obj = open( 876 os.path.join(os.path.dirname(__file__), 'test_image.jpg'),'rb') 875 877 file_ctrl = ctrl.mech_control 876 file_ctrl.add_file( pseudo_image, filename='my_photo.jpg')878 file_ctrl.add_file(file_obj, filename='my_photo.jpg') 877 879 self.browser.getControl( 878 880 name='upload_passportuploadedit').click()
Note: See TracChangeset for help on using the changeset viewer.