Index: main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py	(revision 16545)
+++ main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py	(revision 16551)
@@ -1411,4 +1411,47 @@
         return
 
+    def test_create_student(self):
+        # Managers can contact student
+        IWorkflowState(self.applicant).setState('admitted')
+        self.applicant.certificate = self.certificate
+        self.applicant.course_admitted = self.certificate
+        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
+        self.browser.open(self.manage_path)
+        self.fill_correct_values() 
+        image = open(SAMPLE_IMAGE, 'rb')
+        ctrl = self.browser.getControl(name='form.passport')
+        file_ctrl = ctrl.mech_control
+        file_ctrl.add_file(image, filename='myphoto.jpg')
+        self.browser.getControl("Save").click()
+        self.browser.open(self.view_path)
+        self.browser.getLink("Create student").click()
+        self.assertTrue('Student K1000000 created' in self.browser.contents)
+        self.assertMatches(
+            'Sending email from no-reply@waeup.org to xx@yy.zz:'
+            '\nMessage:'
+            '\nmsg: MIME-Version: 1.0'
+            '\nmsg: Content-Type: text/plain; charset="us-ascii"'
+            '\nmsg: Content-Transfer-Encoding: 7bit'
+            '\nmsg: From: Administrator <no-reply@waeup.org>'
+            '\nmsg: To: John Anthony Tester <xx@yy.zz>'
+            '\nmsg: Reply-To: Administrator <contact@waeup.org>'
+            '\nmsg: Subject: Your new Kofa student account'
+            '\nmsg:'
+            '\nmsg: Dear John Anthony Tester,'
+            '\nmsg:'
+            '\nmsg: Your student record of the Student Registration and Information Portal of'
+            '\nmsg: Sample University has been created for you.'
+            '\nmsg:'
+            '\nmsg: Your user name: K1000000'
+            '\nmsg: Your password: %s'
+            '\nmsg: Login: http://localhost/app/login?login=K1000000&password=%s'
+            '\nmsg:'
+            '\nmsg: Or request a new secure password here: http://localhost/app/changepw'
+            '\nmsg:'
+            '\nmsg: Regards'
+            '\nmsg:' % (self.applicant.application_number, self.applicant.application_number),
+            self.get_fake_smtp_output()
+            )
+        return
 
 class ApplicantRegisterTests(ApplicantsFullSetup):
