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 8033)
+++ main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py	(revision 8037)
@@ -806,10 +806,13 @@
         self.assertEqual(self.browser.url,
             self.container_path + '/registration_complete?email=xx%40yy.zz')
-        # Now we change the application mode and check if applicants
+        return
+
+    def test_register_applicant_update(self):
+        # We change the application mode and check if applicants
         # can find and update imported records instead of creating new records.
         # First we check what happens if record can't be found.
         self.applicantscontainer.mode = 'update'
         self.browser.open(self.container_path + '/register')
-        #self.browser.getControl(name="form.firstname").value = 'John'
+        self.browser.getControl(name="form.firstname").value = 'John'
         self.browser.getControl(name="form.reg_number").value = 'anynumber'
         self.browser.getControl(name="form.email").value = 'xx@yy.zz'
@@ -817,6 +820,6 @@
         self.assertTrue('No application record found.'
             in self.browser.contents)
-        # Now we check if password has already been set.
-        #self.browser.getControl(name="form.firstname").value = 'John'
+        # We can't register if password has already been set.
+        self.browser.getControl(name="form.firstname").value = 'John'
         self.browser.getControl(name="form.reg_number").value = '1234'
         self.browser.getControl("Get login credentials").click()
@@ -828,7 +831,22 @@
             self.applicant.application_number]).context.password = None
         self.browser.open(self.container_path + '/register')
-        #self.browser.getControl(name="form.firstname").value = 'John'
+        self.browser.getControl(name="form.firstname").value = 'John'
         self.browser.getControl(name="form.reg_number").value = '1234'
         self.browser.getControl(name="form.email").value = 'xx@yy.zz'
+        self.browser.getControl("Get login credentials").click()
+        self.assertTrue('An error occurred.'in self.browser.contents)
+        # The firstname attribute was None. Let's set this attribute manually
+        # and try to register with a wrong name.
+        self.applicant.firstname = u'John'
+        self.browser.open(self.container_path + '/register')
+        self.browser.getControl(name="form.firstname").value = 'Johnny'
+        self.browser.getControl(name="form.reg_number").value = '1234'
+        self.browser.getControl(name="form.email").value = 'xx@yy.zz'
+        self.browser.getControl("Get login credentials").click()
+        self.assertTrue('No application record found.'
+            in self.browser.contents)
+        # Now we use the correct name. For verification
+        # the name is not case-sensitive.
+        self.browser.getControl(name="form.firstname").value = 'jOhn'
         self.browser.getControl("Get login credentials").click()
         self.assertTrue('Your registration was successful.'
