Index: main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py	(revision 6796)
+++ main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py	(revision 6798)
@@ -115,13 +115,13 @@
 
         # Populate university
-        certificate = createObject('waeup.Certificate')
-        certificate.code = 'CERT1'
-        certificate.application_category = 'basic'
-        certificate.start_level = 100
-        certificate.end_level = 500
+        self.certificate = createObject('waeup.Certificate')
+        self.certificate.code = 'CERT1'
+        self.certificate.application_category = 'basic'
+        self.certificate.start_level = 100
+        self.certificate.end_level = 500
         self.app['faculties']['fac1'] = Faculty()
         self.app['faculties']['fac1']['dep1'] = Department()
         self.app['faculties']['fac1']['dep1'].certificates.addCertificate(
-            certificate)
+            self.certificate)
 
         # Put the prepopulated site into test ZODB and prepare test
@@ -267,4 +267,22 @@
                            self.browser.contents)
 
+        # Managers can browse all subobjects
+        self.browser.open(self.student_path)
+        self.browser.getLink("Payments").click()
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.assertEqual(self.browser.url, self.payments_student_path)
+        self.browser.open(self.student_path)
+        self.browser.getLink("Accommodation").click()
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.assertEqual(self.browser.url, self.accommodation_student_path)
+        self.browser.open(self.student_path)
+        self.browser.getLink("History").click()
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.assertEqual(self.browser.url, self.history_student_path)
+        self.assertMatches('...Student admitted by zope.mgr...',
+                           self.browser.contents)
+
+    def test_manage_course_lists(self):
+        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
         self.browser.open(self.student_path)
         self.browser.getLink("Study Course").click()
@@ -282,6 +300,5 @@
         self.browser.getControl(name="form.current_level").value = ['100']
         self.browser.getControl("Save").click()
-
-        # Managers can add a any sudy level (course list)
+        # Managers can add a any study level (course list)
         self.browser.getControl(name="addlevel").value = ['100']
         self.browser.getControl("Add study level").click()
@@ -289,24 +306,13 @@
                            self.browser.contents)
 
-        # Managers can browse all subobjects
-        self.browser.open(self.student_path)
-        self.browser.getLink("Payments").click()
-        self.assertEqual(self.browser.headers['Status'], '200 Ok')
-        self.assertEqual(self.browser.url, self.payments_student_path)
-        self.browser.open(self.student_path)
-        self.browser.getLink("Accommodation").click()
-        self.assertEqual(self.browser.headers['Status'], '200 Ok')
-        self.assertEqual(self.browser.url, self.accommodation_student_path)
-        self.browser.open(self.student_path)
-        self.browser.getLink("History").click()
-        self.assertEqual(self.browser.headers['Status'], '200 Ok')
-        self.assertEqual(self.browser.url, self.history_student_path)
-        self.assertMatches('...Student admitted by zope.mgr...',
-                           self.browser.contents)
-
+    def test_manage_workflow(self):
         # Managers can pass through the whole workflow
+        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
         student = self.app['students'][self.test_student_id]
         self.browser.open(self.manage_student_path)
         self.assertTrue(student.clearance_locked)
+        self.browser.getControl(name="transition").value = ['admit']
+        self.browser.getControl("Save").click()
+        self.assertTrue(student.clearance_locked)
         self.browser.getControl(name="transition").value = ['start_clearance']
         self.browser.getControl("Save").click()
@@ -321,11 +327,16 @@
         self.browser.getControl(name="transition").value = ['reset6']
         self.browser.getControl("Save").click()
-        # The pay_school_fee transition triggers some changes
+        # The pay_school_fee transition triggers some changes of previously
+        # set attributes
+        student['studycourse'].certificate = self.certificate
+        student['studycourse'].current_session = 2004
+        student['studycourse'].current_verdict = 'A'
+        student['studycourse'].current_level = 100
         self.browser.getControl(name="transition").value = ['pay_school_fee']
         self.browser.getControl("Save").click()
-        self.assertEqual(student['studycourse'].current_session, 2005) # was 2004
-        self.assertEqual(student['studycourse'].current_level, 200) # was 100
-        self.assertEqual(student['studycourse'].current_verdict, '') # was 'A'
-        self.assertEqual(student['studycourse'].previous_verdict, 'A') # was empty
+        self.assertEqual(student['studycourse'].current_session, 2005)
+        self.assertEqual(student['studycourse'].current_level, 200)
+        self.assertEqual(student['studycourse'].current_verdict, '')
+        self.assertEqual(student['studycourse'].previous_verdict, 'A')
         return
 
