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 7122)
+++ main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py	(revision 7123)
@@ -364,5 +364,5 @@
         # No birth certificate has been uploaded yet
         # Browsing the link shows a placerholder image
-        self.browser.open('birth_certificate.jpg')
+        self.browser.open('birth_certificate')
         self.assertEqual(
             self.browser.headers['content-type'], 'image/jpeg')
@@ -378,5 +378,5 @@
         self.browser.getControl("Save (no upload)").click() # submit form
         self.assertFalse(
-            '<a target="image" href="birth_certificate.jpg">'
+            '<a target="image" href="birth_certificate">'
             in self.browser.contents)
         # ... but the correct upload submit button does
@@ -389,9 +389,9 @@
         # There is a correct <img> link included
         self.assertTrue(
-            '<a target="image" href="birth_certificate.jpg">'
+            '<a target="image" href="birth_certificate">'
             in self.browser.contents)
 
         # Browsing the link shows a real image
-        self.browser.open('birth_certificate.jpg')
+        self.browser.open('birth_certificate')
         self.assertEqual(
             self.browser.headers['content-type'], 'image/jpeg')
@@ -428,10 +428,10 @@
         self.browser.getControl(
             name='upload_birthcertificateuploadmanage').click()
-        self.assertTrue('.jpg file extension expected' in self.browser.contents)
+        self.assertTrue('Only the following extension are allowed'
+            in self.browser.contents)
         # Managers can delete files
         self.browser.getControl(name='delete_birthcertificateuploadmanage').click()
         self.assertTrue(
-            'File birth_certificate.jpg deleted'
-            in self.browser.contents)
+            'birth_certificate deleted' in self.browser.contents)
         # Managers can add and delete second file
         self.browser.open(self.edit_clearance_student_path)
@@ -443,5 +443,5 @@
             name='upload_acceptanceletteruploadmanage').click()
         self.assertFalse(
-            '<a target="image" href="acceptance_letter.jpg">'
+            '<a target="image" href="acceptance_letter">'
             in self.browser.contents)
         ctrl = self.browser.getControl(name='acceptanceletteruploadmanage')
@@ -451,10 +451,28 @@
             name='upload_acceptanceletteruploadmanage').click()
         self.assertTrue(
-            '<a target="image" href="acceptance_letter.jpg">'
+            '<a target="image" href="acceptance_letter">'
             in self.browser.contents)
         self.browser.getControl(
             name='delete_acceptanceletteruploadmanage').click()
         self.assertTrue(
-            'File acceptance_letter.jpg deleted'
+            'acceptance_letter deleted'
+            in self.browser.contents)
+        # Managers can upload a file via the StudentBaseManageFormPage
+        self.browser.open(self.manage_student_path)
+        pseudo_image = StringIO('I pretend to be a graphics file')
+        ctrl = self.browser.getControl(name='passportuploadmanage')
+        file_ctrl = ctrl.mech_control
+        file_ctrl.add_file(pseudo_image, filename='my_photo.bmp')
+        self.browser.getControl(
+            name='upload_passportuploadmanage').click()
+        self.assertTrue('jpg file extension expected'
+            in self.browser.contents)
+        ctrl = self.browser.getControl(name='passportuploadmanage')
+        file_ctrl = ctrl.mech_control
+        file_ctrl.add_file(pseudo_image, filename='my_photo.jpg')
+        self.browser.getControl(
+            name='upload_passportuploadmanage').click()
+        self.assertTrue(
+            '<img align="middle" height="125px" src="passport.jpg" />'
             in self.browser.contents)
 
