Index: main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 13046)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 13047)
@@ -1476,7 +1476,4 @@
             '...<div>Academics Officer (view only)</div>...',
             self.browser.contents)
-        #self.assertMatches(
-        #    '...<div>Students Officer (view only)</div>...',
-        #    self.browser.contents)
         # But not his local role ...
         self.assertFalse('Clearance Officer' in self.browser.contents)
@@ -1484,5 +1481,6 @@
         # has changed
         notify(LocalRoleSetEvent(
-            self.department, 'waeup.local.ClearanceOfficer', 'mrclear', granted=True))
+            self.department, 'waeup.local.ClearanceOfficer', 'mrclear',
+            granted=True))
         self.browser.open('http://localhost/app/users/mrclear/my_roles')
         self.assertTrue('Clearance Officer' in self.browser.contents)
@@ -1525,12 +1523,12 @@
             self.browser.url, self.student_path + '/reject_clearance')
         # Type comment why
-        self.browser.getControl(name="form.officer_comment").value = """Dear Student,
-You did not fill properly.
-"""
+        self.browser.getControl(name="form.officer_comment").value = (
+            'Dear Student,\n'
+            'You did not fill properly.')
         self.browser.getControl("Save comment").click()
         self.assertTrue('Clearance has been annulled' in self.browser.contents)
         url = ('http://localhost/app/students/K1000000/'
               'contactstudent?body=Dear+Student%2C%0AYou+did+not+fill+properly.'
-              '%0A&subject=Clearance+has+been+annulled.')
+              '&subject=Clearance+has+been+annulled.')
         # CO does now see the prefilled contact form and can send a message
         self.assertEqual(self.browser.url, url)
@@ -1545,5 +1543,5 @@
         # The comment has been stored ...
         self.assertEqual(self.student.officer_comment,
-            u'Dear Student,\nYou did not fill properly.\n')
+            u'Dear Student,\nYou did not fill properly.')
         # ... and logged
         logfile = os.path.join(
@@ -1553,5 +1551,5 @@
             'INFO - mrclear - students.browser.StudentRejectClearancePage - '
             'K1000000 - comment: Dear Student,<br>You did not fill '
-            'properly.<br>\n' in logcontent)
+            'properly.\n' in logcontent)
         self.browser.open(self.history_path)
         self.assertTrue("Reset to 'clearance started' by My Public Name" in
@@ -1601,5 +1599,6 @@
         # Additional setups according to test above
         notify(LocalRoleSetEvent(
-            self.department, 'waeup.local.ClearanceOfficer', 'mrclear', granted=True))
+            self.department, 'waeup.local.ClearanceOfficer', 'mrclear',
+            granted=True))
         self.app['configuration']['2004'].clearance_enabled = True
         IWorkflowState(self.student).setState('clearance requested')
@@ -2971,10 +2970,8 @@
 
     def test_student_accommodation(self):
-        # Login
         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()
-
         # Students can add online booking fee payment tickets and open the
         # callback view (see test_manage_payments)
@@ -2993,5 +2990,4 @@
         parts = pin.split('-')[1:]
         sfeseries, sfenumber = parts
-
         # Students can use HOS code and book a bed space with it ...
         self.browser.open(self.acco_path)
@@ -3029,14 +3025,11 @@
         self.assertMatches('...Hall 1, Block A, Room 101, Bed A...',
                            self.browser.contents)
-
         # Bed has been allocated
         bed = self.app['hostels']['hall-1']['hall-1_A_101_A']
         self.assertTrue(bed.owner == self.student_id)
-
         # BedTicketAddPage is now blocked
         self.browser.getLink("Book accommodation").click()
         self.assertMatches('...You already booked a bed space...',
             self.browser.contents)
-
         # The bed ticket displays the data correctly
         self.browser.open(self.acco_path + '/2004')
@@ -3046,10 +3039,8 @@
         self.assertMatches('...regular_male_fr...', self.browser.contents)
         self.assertMatches('...%s...' % pin, self.browser.contents)
-
         # Students can open the pdf slip
         self.browser.open(self.browser.url + '/bed_allocation_slip.pdf')
         self.assertEqual(self.browser.headers['Status'], '200 Ok')
         self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
-
         # Students can't relocate themselves
         self.assertFalse('Relocate' in self.browser.contents)
@@ -3057,10 +3048,8 @@
         self.assertRaises(
             Unauthorized, self.browser.open, relocate_path)
-
         # Students can't the Remove button and check boxes
         self.browser.open(self.acco_path)
         self.assertFalse('Remove' in self.browser.contents)
         self.assertFalse('val_id' in self.browser.contents)
-
         # Students can pay maintenance fee now
         self.browser.open(self.payments_path)
@@ -3070,5 +3059,4 @@
         self.assertMatches('...Payment ticket created...',
                            self.browser.contents)
-
         ctrl = self.browser.getControl(name='val_id')
         value = ctrl.options[0]
