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 13163)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 13164)
@@ -1479,5 +1479,5 @@
         self.init_clearance_officer()
         self.assertMatches('...You logged in...', self.browser.contents)
-        # CO is landing on index page
+        # CO is landing on index page.
         self.assertEqual(self.browser.url, 'http://localhost/app/index')
         # CO can see his roles
@@ -1489,5 +1489,5 @@
         self.assertFalse('Clearance Officer' in self.browser.contents)
         # ... because we forgot to notify the department that the local role
-        # has changed
+        # has changed.
         notify(LocalRoleSetEvent(
             self.department, 'waeup.local.ClearanceOfficer', 'mrclear',
@@ -1502,8 +1502,8 @@
         self.assertEqual(self.browser.headers['Status'], '200 Ok')
         self.assertEqual(self.browser.url, self.clearance_path)
-        # ... but not other students
+        # ... but not other students.
         self.assertRaises(
             Unauthorized, self.browser.open, self.other_student_path)
-        # Clearance is disabled for this session
+        # Clearance is disabled for this session.
         self.browser.open(self.clearance_path)
         self.assertFalse('Clear student' in self.browser.contents)
@@ -1512,5 +1512,5 @@
             in self.browser.contents)
         self.app['configuration']['2004'].clearance_enabled = True
-        # Only in state clearance requested the CO does see the 'Clear' button
+        # Only in state clearance requested the CO does see the 'Clear' button.
         self.browser.open(self.clearance_path)
         self.assertFalse('Clear student' in self.browser.contents)
@@ -1532,5 +1532,5 @@
         self.assertEqual(
             self.browser.url, self.student_path + '/reject_clearance')
-        # Type comment why
+        # Type comment why.
         self.browser.getControl(name="form.officer_comment").value = (
             'Dear Student,\n'
@@ -1541,5 +1541,5 @@
               'contactstudent?body=Dear+Student%2C%0AYou+did+not+fill+properly.'
               '&subject=Clearance+has+been+annulled.')
-        # CO does now see the prefilled contact form and can send a message
+        # CO does now see the prefilled contact form and can send a message.
         self.assertEqual(self.browser.url, url)
         self.assertTrue('clearance started' in self.browser.contents)
@@ -1554,5 +1554,5 @@
         self.assertEqual(self.student.officer_comment,
             u'Dear Student,\nYou did not fill properly.')
-        # ... and logged
+        # ... and logged.
         logfile = os.path.join(
             self.app['datacenter'].storage, 'logs', 'students.log')
@@ -1573,5 +1573,5 @@
         self.assertTrue('clearance started' in self.browser.contents)
         # The CO can't clear students if not in state
-        # clearance requested
+        # clearance requested.
         self.browser.open(self.student_path + '/clear')
         self.assertTrue('Student is in wrong state'
@@ -1580,5 +1580,5 @@
         self.browser.open('http://localhost/app/users/mrclear/my_roles')
         self.browser.getLink("http://localhost/app/faculties/fac1/dep1").click()
-        # ... and view the list of students
+        # ... and view the list of students.
         self.browser.getLink("Show students").click()
         self.browser.getControl(name="session").value = ['2004']
@@ -1590,8 +1590,8 @@
         self.browser.getControl("Show").click()
         self.assertTrue(self.student_id in self.browser.contents)
-        # The comment is indicated by 'yes'
+        # The comment is indicated by 'yes'.
         self.assertTrue('<td><span>yes</span></td>' in self.browser.contents)
         # Check if the enquiries form is not pre-filled with officer_comment
-        # (regression test)
+        # (regression test).
         self.browser.getLink("Logout").click()
         self.browser.open('http://localhost/app/enquiries')
@@ -1640,5 +1640,5 @@
         prmlocal.assignRoleToPrincipal('waeup.local.CourseAdviser100', 'mrsadvise')
         IWorkflowState(self.student).setState('school fee paid')
-        # Login as course adviser
+        # Login as course adviser.
         self.browser.open(self.login_path)
         self.browser.getControl(name="form.login").value = 'mrsadvise'
@@ -1646,5 +1646,5 @@
         self.browser.getControl("Login").click()
         self.assertMatches('...You logged in...', self.browser.contents)
-        # CO can see his roles
+        # CO can see his roles.
         self.browser.getLink("My Roles").click()
         self.assertMatches(
@@ -1654,5 +1654,5 @@
         self.assertFalse('Course Adviser' in self.browser.contents)
         # ... because we forgot to notify the certificate that the local role
-        # has changed
+        # has changed.
         notify(LocalRoleSetEvent(
             cert, 'waeup.local.CourseAdviser100', 'mrsadvise', granted=True))
@@ -1666,5 +1666,5 @@
         self.assertEqual(self.browser.headers['Status'], '200 Ok')
         self.assertEqual(self.browser.url, self.student_path)
-        # ... but not other students
+        # ... but not other students.
         other_student = Student()
         other_student.firstname = u'Dep2'
@@ -1675,5 +1675,5 @@
         self.assertRaises(
             Unauthorized, self.browser.open, other_student_path)
-        # We add study level 110 to the student's studycourse
+        # We add study level 110 to the student's studycourse.
         studylevel = StudentStudyLevel()
         studylevel.level = 110
@@ -1681,5 +1681,5 @@
             cert,studylevel)
         L110_student_path = self.studycourse_path + '/110'
-        # The CA can neither see the Validate nor the Edit button
+        # The CA can neither see the Validate nor the Edit button.
         self.browser.open(L110_student_path)
         self.assertFalse('Validate courses' in self.browser.contents)
@@ -1692,10 +1692,10 @@
         # corresponds with the name of the study level object
         # the 100L CA does see the 'Validate' button but not
-        # the edit button
+        # the edit button.
         self.student['studycourse'].current_level = 110
         self.browser.open(L110_student_path)
         self.assertFalse('Edit' in self.browser.contents)
         self.assertTrue('Validate courses' in self.browser.contents)
-        # But a 100L CA does not see the button at other levels
+        # But a 100L CA does not see the button at other levels.
         studylevel2 = StudentStudyLevel()
         studylevel2.level = 200
@@ -1731,5 +1731,5 @@
             in self.browser.contents)
         self.assertTrue('school fee paid' in self.browser.contents)
-        # CA does now see the contact form and can send a message
+        # CA does now see the contact form and can send a message.
         self.browser.getControl(name="form.subject").value = 'Important subject'
         self.browser.getControl(name="form.body").value = 'Course list rejected'
@@ -1737,5 +1737,5 @@
         self.assertTrue('Your message has been sent' in self.browser.contents)
         # The CA does now see the Edit button and can edit
-        # current study level
+        # current study level.
         self.browser.open(L110_student_path)
         self.browser.getLink("Edit").click()
@@ -1743,13 +1743,13 @@
             in self.browser.contents)
         # The CA can't validate courses if not in state
-        # courses registered
+        # courses registered.
         self.browser.open(L110_student_path + '/validate_courses')
         self.assertTrue('Student is in the wrong state'
             in self.browser.contents)
-        # The CA can go to his certificate through the my_roles page
+        # The CA can go to his certificate through the my_roles page ...
         self.browser.open('http://localhost/app/users/mrsadvise/my_roles')
         self.browser.getLink(
             "http://localhost/app/faculties/fac1/dep1/certificates/CERT1").click()
-        # and view the list of students
+        # ... and view the list of students.
         self.browser.getLink("Show students").click()
         self.browser.getControl(name="session").value = ['2004']
@@ -1762,9 +1762,9 @@
         self.app['users']['mrslecturer'].email = 'mrslecturer@foo.ng'
         self.app['users']['mrslecturer'].title = u'Mercedes Benz'
-        # Assign local Lecturer role for a certificate
+        # Assign local Lecturer role for a certificate.
         course = self.app['faculties']['fac1']['dep1'].courses['COURSE1']
         prmlocal = IPrincipalRoleManager(course)
         prmlocal.assignRoleToPrincipal('waeup.local.Lecturer', 'mrslecturer')
-        # Login as lecturer
+        # Login as lecturer.
         self.browser.open(self.login_path)
         self.browser.getControl(name="form.login").value = 'mrslecturer'
@@ -1772,5 +1772,5 @@
         self.browser.getControl("Login").click()
         self.assertMatches('...You logged in...', self.browser.contents)
-        # CO can see her roles
+        # CO can see her roles.
         self.browser.getLink("My Roles").click()
         self.assertMatches(
@@ -1780,5 +1780,5 @@
         self.assertFalse('Lecturer' in self.browser.contents)
         # ... because we forgot to notify the course that the local role
-        # has changed
+        # has changed.
         notify(LocalRoleSetEvent(
             course, 'waeup.local.Lecturer', 'mrslecturer', granted=True))
@@ -1788,8 +1788,8 @@
             '...<a href="http://localhost/app/faculties/fac1/dep1/courses/COURSE1">...',
             self.browser.contents)
-        # The lecturer can go to her course
+        # The lecturer can go to her course ...
         self.browser.getLink(
             "http://localhost/app/faculties/fac1/dep1/courses/COURSE1").click()
-        # and view the list of students
+        # ... and view the list of students
         self.browser.getLink("Show students").click()
         self.browser.getControl(name="session").value = ['2004']
@@ -1797,5 +1797,5 @@
         self.browser.getControl("Show").click()
         self.assertTrue('No student found.' in self.browser.contents)
-        # No student in course so far
+        # No student in course so far.
         self.assertFalse(self.student_id in self.browser.contents)
         studylevel = createObject(u'waeup.StudentStudyLevel')
@@ -1820,5 +1820,5 @@
         self.assertRaises(
             Unauthorized, self.browser.open, course_ticket_path)
-        # Course results can be batch edited via the edit_courses view
+        # Course results can be batch edited via the edit_courses view.
         self.app['faculties']['fac1']['dep1'].score_editing_disabled = True
         self.browser.open("http://localhost/app/faculties/fac1/dep1/courses/COURSE1")
@@ -1834,5 +1834,5 @@
             in self.browser.contents)
         IWorkflowState(self.student).setState('courses validated')
-        # Student must be in state 'courses validated'
+        # Student must be in state 'courses validated'.
         self.browser.open(
             "http://localhost/app/faculties/fac1/dep1/courses/COURSE1/edit_scores")
@@ -1842,8 +1842,8 @@
         self.browser.getControl(name="scores", index=0).value = '55'
         self.browser.getControl("Update scores").click()
-        # New score has been set
+        # New score has been set.
         self.assertEqual(
             self.student['studycourse']['100']['COURSE1'].score, 55)
-        # Score editing has been logged
+        # Score editing has been logged.
         logfile = os.path.join(
             self.app['datacenter'].storage, 'logs', 'students.log')
@@ -1851,5 +1851,5 @@
         self.assertTrue('mrslecturer - students.browser.EditScoresPage - '
                         'K1000000 100/COURSE1 score updated (55)' in logcontent)
-        # Non-integer scores won't be accepted
+        # Non-integer scores won't be accepted.
         self.browser.open(
             "http://localhost/app/faculties/fac1/dep1/courses/COURSE1/edit_scores")
@@ -1859,5 +1859,5 @@
         self.assertTrue('Error: Score(s) of Anna Tester have not be updated'
             in self.browser.contents)
-        # Scores can be removed
+        # Scores can be removed.
         self.browser.open(
             "http://localhost/app/faculties/fac1/dep1/courses/COURSE1/edit_scores")
@@ -2985,5 +2985,5 @@
         self.browser.getControl("Login").click()
         # Students can add online booking fee payment tickets and open the
-        # callback view (see test_manage_payments)
+        # callback view (see test_manage_payments).
         self.browser.getLink("Payments").click()
         self.browser.getLink("Add current session payment ticket").click()
@@ -2994,5 +2994,5 @@
         self.browser.getLink(value).click()
         self.browser.open(self.browser.url + '/fake_approve')
-        # The new HOS-0 pin has been created
+        # The new HOS-0 pin has been created.
         self.assertEqual(len(self.app['accesscodes']['HOS-0']),1)
         pin = self.app['accesscodes']['HOS-0'].keys()[0]
@@ -3029,5 +3029,5 @@
         self.assertMatches('...You are not the owner of this access code...',
                            self.browser.contents)
-        # The bed remains empty
+        # The bed remains empty.
         bed = self.app['hostels']['hall-1']['hall-1_A_101_A']
         self.assertTrue(bed.owner == NOT_OCCUPIED)
@@ -3038,11 +3038,11 @@
         self.assertMatches('...Hall 1, Block A, Room 101, Bed A...',
                            self.browser.contents)
-        # Bed has been allocated
+        # Bed has been allocated.
         self.assertTrue(bed.owner == self.student_id)
-        # BedTicketAddPage is now blocked
+        # 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
+        # The bed ticket displays the data correctly.
         self.browser.open(self.acco_path + '/2004')
         self.assertMatches('...Hall 1, Block A, Room 101, Bed A...',
@@ -3051,18 +3051,18 @@
         self.assertMatches('...regular_male_fr...', self.browser.contents)
         self.assertMatches('...%s...' % pin, self.browser.contents)
-        # Students can open the pdf slip
+        # 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
+        # Students can't relocate themselves.
         self.assertFalse('Relocate' in self.browser.contents)
         relocate_path = self.acco_path + '/2004/relocate'
         self.assertRaises(
             Unauthorized, self.browser.open, relocate_path)
-        # Students can't the Remove button and check boxes
+        # Students can't see 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
+        # Students can pay maintenance fee now.
         self.browser.open(self.payments_path)
         self.browser.open(self.payments_path + '/addop')
@@ -3073,5 +3073,5 @@
         ctrl = self.browser.getControl(name='val_id')
         value = ctrl.options[0]
-        # Maintennace fee is taken from the hostel object
+        # Maintennace fee is taken from the hostel object.
         self.assertEqual(self.student['payments'][value].amount_auth, 876.0)
         # If the hostel's maintenance fee isn't set, the fee is
