Index: main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py	(revision 7124)
+++ main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py	(revision 7127)
@@ -357,5 +357,5 @@
         return
 
-    def test_upload_file(self):
+    def test_manage_upload_file(self):
         # Managers can upload a file via the StudentClearanceManageFormPage
         # The image is stored even if form has errors
@@ -372,5 +372,5 @@
         self.browser.open(self.edit_clearance_student_path)
         pseudo_image = StringIO('I pretend to be a graphics file')
-        ctrl = self.browser.getControl(name='birthcertificateuploadmanage')
+        ctrl = self.browser.getControl(name='birthcertificateupload')
         file_ctrl = ctrl.mech_control
         file_ctrl.add_file(pseudo_image, filename='my_birth_certificate.jpg')
@@ -382,9 +382,9 @@
         # ... but the correct upload submit button does
         pseudo_image = StringIO('I pretend to be a graphics file')
-        ctrl = self.browser.getControl(name='birthcertificateuploadmanage')
+        ctrl = self.browser.getControl(name='birthcertificateupload')
         file_ctrl = ctrl.mech_control
         file_ctrl.add_file(pseudo_image, filename='my_birth_certificate.jpg')
         self.browser.getControl(
-            name='upload_birthcertificateuploadmanage').click()
+            name='upload_birthcertificateupload').click()
         # There is a correct <img> link included
         self.assertTrue(
@@ -401,35 +401,35 @@
         photo_content = 'A' * 1024 * 151  # A string of 21 KB size
         pseudo_image = StringIO(photo_content)
-        ctrl = self.browser.getControl(name='birthcertificateuploadmanage')
+        ctrl = self.browser.getControl(name='birthcertificateupload')
         file_ctrl = ctrl.mech_control
         file_ctrl.add_file(pseudo_image, filename='my_birth_certificate.jpg')
         self.browser.getControl(
-            name='upload_birthcertificateuploadmanage').click()
+            name='upload_birthcertificateupload').click()
         self.assertTrue(
             'Uploaded file is too big' in self.browser.contents)
         # File names must meet several conditions
         pseudo_image = StringIO('I pretend to be a graphics file')
-        ctrl = self.browser.getControl(name='birthcertificateuploadmanage')
+        ctrl = self.browser.getControl(name='birthcertificateupload')
         file_ctrl = ctrl.mech_control
         file_ctrl.add_file(pseudo_image, filename='my.photo.jpg')
         self.browser.getControl(
-            name='upload_birthcertificateuploadmanage').click()
+            name='upload_birthcertificateupload').click()
         self.assertTrue('File name contains more than one dot'
             in self.browser.contents)
-        ctrl = self.browser.getControl(name='birthcertificateuploadmanage')
+        ctrl = self.browser.getControl(name='birthcertificateupload')
         file_ctrl = ctrl.mech_control
         file_ctrl.add_file(pseudo_image, filename='my_birth_certificate')
         self.browser.getControl(
-            name='upload_birthcertificateuploadmanage').click()
+            name='upload_birthcertificateupload').click()
         self.assertTrue('File name has no extension' in self.browser.contents)
-        ctrl = self.browser.getControl(name='birthcertificateuploadmanage')
+        ctrl = self.browser.getControl(name='birthcertificateupload')
         file_ctrl = ctrl.mech_control
         file_ctrl.add_file(pseudo_image, filename='my_birth_certificate.bmp')
         self.browser.getControl(
-            name='upload_birthcertificateuploadmanage').click()
+            name='upload_birthcertificateupload').click()
         self.assertTrue('Only the following extension are allowed'
             in self.browser.contents)
         # Managers can delete files
-        self.browser.getControl(name='delete_birthcertificateuploadmanage').click()
+        self.browser.getControl(name='delete_birthcertificateupload').click()
         self.assertTrue(
             'birth_certificate deleted' in self.browser.contents)
@@ -437,22 +437,22 @@
         self.browser.open(self.edit_clearance_student_path)
         pseudo_image = StringIO('I pretend to be a graphics file')
-        ctrl = self.browser.getControl(name='birthcertificateuploadmanage')
+        ctrl = self.browser.getControl(name='birthcertificateupload')
         file_ctrl = ctrl.mech_control
         file_ctrl.add_file(pseudo_image, filename='my_acceptance_letter.jpg')
         self.browser.getControl(
-            name='upload_acceptanceletteruploadmanage').click()
+            name='upload_acceptanceletterupload').click()
         self.assertFalse(
             '<a target="image" href="acceptance_letter">'
             in self.browser.contents)
-        ctrl = self.browser.getControl(name='acceptanceletteruploadmanage')
+        ctrl = self.browser.getControl(name='acceptanceletterupload')
         file_ctrl = ctrl.mech_control
         file_ctrl.add_file(pseudo_image, filename='my_acceptance_letter.jpg')
         self.browser.getControl(
-            name='upload_acceptanceletteruploadmanage').click()
+            name='upload_acceptanceletterupload').click()
         self.assertTrue(
             '<a target="image" href="acceptance_letter">'
             in self.browser.contents)
         self.browser.getControl(
-            name='delete_acceptanceletteruploadmanage').click()
+            name='delete_acceptanceletterupload').click()
         self.assertTrue(
             'acceptance_letter deleted'
@@ -738,4 +738,15 @@
         self.browser.getControl(name="form.password").value = 'spwd'
         self.browser.getControl("Login").click()
+        # Student can upload a passport picture
+        self.browser.open(self.student_path + '/change_portrait')
+        pseudo_image = StringIO('I pretend to be a graphics file')
+        ctrl = self.browser.getControl(name='passportuploadedit')
+        file_ctrl = ctrl.mech_control
+        file_ctrl.add_file(pseudo_image, filename='my_photo.jpg')
+        self.browser.getControl(
+            name='upload_passportuploadedit').click()
+        self.assertTrue(
+            '<img align="middle" height="125px" src="passport.jpg" />'
+            in self.browser.contents)
         # Student can view the clearance data
         self.browser.getLink("Clearance Data").click()
