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 7110)
+++ main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py	(revision 7111)
@@ -374,5 +374,5 @@
         ctrl = self.browser.getControl(name='birth_certificate')
         file_ctrl = ctrl.mech_control
-        file_ctrl.add_file(pseudo_image, filename='myphoto.jpg')
+        file_ctrl.add_file(pseudo_image, filename='my_birth_certificate.jpg')
         # The Save action does not upload files
         self.browser.getControl("Save (no upload)").click() # submit form
@@ -380,10 +380,10 @@
             '<a target="image" href="birth_certificate.jpg">'
             in self.browser.contents)
-        # ... but the Upload submit button does
+        # ... but the correct upload submit button does
         pseudo_image = StringIO('I pretend to be a graphics file')
         ctrl = self.browser.getControl(name='birth_certificate')
         file_ctrl = ctrl.mech_control
-        file_ctrl.add_file(pseudo_image, filename='myphoto.jpg')
-        self.browser.getControl("Upload").click()
+        file_ctrl.add_file(pseudo_image, filename='my_birth_certificate.jpg')
+        self.browser.getControl(name='upload_birth_certificate').click()
         # There is a correct <img> link included
         self.assertTrue(
@@ -401,6 +401,6 @@
         ctrl = self.browser.getControl(name='birth_certificate')
         file_ctrl = ctrl.mech_control
-        file_ctrl.add_file(pseudo_image, filename='myphoto.jpg')
-        self.browser.getControl("Upload").click()
+        file_ctrl.add_file(pseudo_image, filename='my_birth_certificate.jpg')
+        self.browser.getControl(name='upload_birth_certificate').click()
         self.assertTrue(
             'Uploaded file is too big' in self.browser.contents)
@@ -410,21 +410,42 @@
         file_ctrl = ctrl.mech_control
         file_ctrl.add_file(pseudo_image, filename='my.photo.jpg')
-        self.browser.getControl("Upload").click()
+        self.browser.getControl(name='upload_birth_certificate').click()
         self.assertTrue('File name contains more than one dot'
             in self.browser.contents)
         ctrl = self.browser.getControl(name='birth_certificate')
         file_ctrl = ctrl.mech_control
-        file_ctrl.add_file(pseudo_image, filename='myphoto')
-        self.browser.getControl("Upload").click()
+        file_ctrl.add_file(pseudo_image, filename='my_birth_certificate')
+        self.browser.getControl(name='upload_birth_certificate').click()
         self.assertTrue('File name has no extension' in self.browser.contents)
         ctrl = self.browser.getControl(name='birth_certificate')
         file_ctrl = ctrl.mech_control
-        file_ctrl.add_file(pseudo_image, filename='myphoto.bmp')
-        self.browser.getControl("Upload").click()
+        file_ctrl.add_file(pseudo_image, filename='my_birth_certificate.bmp')
+        self.browser.getControl(name='upload_birth_certificate').click()
         self.assertTrue('.jpg file extension expected' in self.browser.contents)
         # Managers can delete files
-        self.browser.getControl("Delete").click()
+        self.browser.getControl(name='delete_birth_certificate').click()
         self.assertTrue(
             'File birth_certificate.jpg deleted'
+            in self.browser.contents)
+        # Managers can add and delete second file
+        self.browser.open(self.edit_clearance_student_path)
+        pseudo_image = StringIO('I pretend to be a graphics file')
+        ctrl = self.browser.getControl(name='birth_certificate')
+        file_ctrl = ctrl.mech_control
+        file_ctrl.add_file(pseudo_image, filename='my_acceptance_letter.jpg')
+        self.browser.getControl(name='upload_acceptance_letter').click()
+        self.assertFalse(
+            '<a target="image" href="acceptance_letter.jpg">'
+            in self.browser.contents)
+        ctrl = self.browser.getControl(name='acceptance_letter')
+        file_ctrl = ctrl.mech_control
+        file_ctrl.add_file(pseudo_image, filename='my_acceptance_letter.jpg')
+        self.browser.getControl(name='upload_acceptance_letter').click()
+        self.assertTrue(
+            '<a target="image" href="acceptance_letter.jpg">'
+            in self.browser.contents)
+        self.browser.getControl(name='delete_acceptance_letter').click()
+        self.assertTrue(
+            'File acceptance_letter.jpg deleted'
             in self.browser.contents)
 
