Index: main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py
===================================================================
--- main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py	(revision 17457)
+++ main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py	(revision 17542)
@@ -230,5 +230,5 @@
         self.assertTrue('Clearance has been requested'
             in self.browser.contents)
-        # Now student can export physical_clearance.slip
+        # Now student can export physical_clearance_slip
         self.app['configuration'].name = u'University of Benin'
         self.student.physical_clearance_date = u'January 5th, 2015'
@@ -240,4 +240,34 @@
         open(path, 'wb').write(self.browser.contents)
         print "Sample PDF clearance_invitation_slip.pdf written to %s" % path
+
+    def test_medical_examination_slip(self):
+        # Student can export medical_examination_slip
+        self.app['configuration']['2004'].medical_clearance_fee = 1000.0
+        self.app['configuration'].name = u'University of Benin'
+        IWorkflowState(self.student).setState('cleared')
+        self.student.perm_address = u'My Address in Nigeria'
+        self.student.physical_clearance_date = u'January 5th, 2015'
+        self.browser.open(self.login_path)
+        self.browser.getControl(name="form.login").value = self.student_id
+        self.browser.getControl(name="form.password").value = 'spwd'
+        self.browser.getControl("Login").click()
+        self.browser.open(self.clearance_path)
+        self.browser.getLink("Download medical examination slip").click()
+        self.assertTrue('Please pay medical clearance fee first' in
+            self.browser.contents)
+        self.browser.open(self.payments_path)
+        self.browser.getLink("Add current session payment ticket").click()
+        self.browser.getControl(name="form.p_category").value = ['medical_clearance']
+        self.browser.getControl("Create ticket").click()
+        p_ticket = self.student['payments'].values()[0]
+        p_ticket.approveStudentPayment()
+        self.browser.open(self.clearance_path)
+        self.browser.getLink("Download medical examination slip").click()
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
+        path = os.path.join(samples_dir(), 'medical_examination_slip.pdf')
+        open(path, 'wb').write(self.browser.contents)
+        print "Sample PDF medical_examination_slip.pdf written to %s" % path
+
         # Students can open the personal edit page and see the parent_email field.
         self.browser.open(self.student_path + '/edit_personal')
