Index: main/waeup.sirp/trunk/src/waeup/sirp/students/container.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/students/container.py	(revision 6844)
+++ main/waeup.sirp/trunk/src/waeup/sirp/students/container.py	(revision 6845)
@@ -45,6 +45,5 @@
                 'StudentsContainers contain only IStudent instances')
         self[student.student_id] = student
-        # Return student_id (only needed in tests)
-        return student.student_id
+        return
 
     logger_name = 'waeup.sirp.${sitename}.students'
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 6844)
+++ main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py	(revision 6845)
@@ -74,10 +74,11 @@
         student.reg_number = u'123'
         student.matric_number = u'234'
-        self.test_student_id = self.app['students'].addStudent(student)
-        self.student = self.app['students'][self.test_student_id]
+        self.app['students'].addStudent(student)
+        self.student_id = student.student_id
+        self.student = self.app['students'][self.student_id]
 
         # Set password
         IUserAccount(
-            self.app['students'][self.test_student_id]).setPassword('spwd')
+            self.app['students'][self.student_id]).setPassword('spwd')
 
         self.login_path = 'http://localhost/app/login'
@@ -85,5 +86,5 @@
         self.manage_container_path = self.container_path + '/@@manage'
         self.add_student_path = self.container_path + '/addstudent'
-        self.student_path = self.container_path + '/' + self.test_student_id
+        self.student_path = self.container_path + '/' + self.student_id
         self.manage_student_path = self.student_path + '/edit_base'
         self.clearance_student_path = self.student_path + '/view_clearance'
@@ -206,5 +207,5 @@
         self.assertTrue('Empty search string' in self.browser.contents)
         self.browser.getControl(name="searchtype").value = ['student_id']
-        self.browser.getControl(name="searchterm").value = self.test_student_id
+        self.browser.getControl(name="searchterm").value = self.student_id
         self.browser.getControl("Search").click()
         self.assertTrue('Anna Tester' in self.browser.contents)
@@ -222,9 +223,9 @@
 
         ctrl = self.browser.getControl(name='entries')
-        ctrl.getControl(value=self.test_student_id).selected = True
+        ctrl.getControl(value=self.student_id).selected = True
         self.browser.getControl("Remove selected", index=0).click()
         self.assertTrue('Successfully removed' in self.browser.contents)
         self.browser.getControl(name="searchtype").value = ['student_id']
-        self.browser.getControl(name="searchterm").value = self.test_student_id
+        self.browser.getControl(name="searchterm").value = self.student_id
         self.browser.getControl("Search").click()
         self.assertTrue('No student found' in self.browser.contents)
@@ -232,5 +233,5 @@
         self.browser.open(self.container_path)
         self.browser.getControl(name="searchtype").value = ['student_id']
-        self.browser.getControl(name="searchterm").value = self.test_student_id
+        self.browser.getControl(name="searchterm").value = self.student_id
         self.browser.getControl("Search").click()
         self.assertTrue('No student found' in self.browser.contents)
@@ -354,5 +355,5 @@
         # Managers can pass through the whole workflow
         self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-        student = self.app['students'][self.test_student_id]
+        student = self.app['students'][self.student_id]
         self.browser.open(self.manage_student_path)
         self.assertTrue(student.clearance_locked)
@@ -391,5 +392,5 @@
         # Students can change the password
         self.browser.open(self.login_path)
-        self.browser.getControl(name="form.login").value = self.test_student_id
+        self.browser.getControl(name="form.login").value = self.student_id
         self.browser.getControl(name="form.password").value = 'spwd'
         self.browser.getControl("Login").click()
@@ -418,5 +419,5 @@
         self.browser.getLink("Login").click()
         self.browser.open(self.login_path)
-        self.browser.getControl(name="form.login").value = self.test_student_id
+        self.browser.getControl(name="form.login").value = self.student_id
         self.browser.getControl(name="form.password").value = 'new_password'
         self.browser.getControl("Login").click()
@@ -430,7 +431,7 @@
         student.reg_number = u'123456'
         student.fullname = u'Klaus Tester'
-        test_student_id = self.app['students'].addStudent(student)
+        self.app['students'].addStudent(student)
         setpassword_path = 'http://localhost/app/setpassword'
-        student_path = 'http://localhost/app/students/%s' % test_student_id
+        student_path = 'http://localhost/app/students/%s' % student.student_id
         self.browser.open(setpassword_path)
         self.browser.getControl(name="ac_series").value = self.existing_pwdseries
@@ -465,5 +466,5 @@
         # The student can login with the new credentials
         self.browser.open(self.login_path)
-        self.browser.getControl(name="form.login").value = test_student_id
+        self.browser.getControl(name="form.login").value = student.student_id
         self.browser.getControl(
             name="form.password").value = self.existing_pwdnumber
@@ -476,8 +477,8 @@
         # Students can access their own objects
         # and can perform actions
-        student = self.app['students'][self.test_student_id]
+        student = self.app['students'][self.student_id]
         IWorkflowInfo(student).fireTransition('admit')
         self.browser.open(self.login_path)
-        self.browser.getControl(name="form.login").value = self.test_student_id
+        self.browser.getControl(name="form.login").value = self.student_id
         self.browser.getControl(name="form.password").value = 'spwd'
         self.browser.getControl("Login").click()
