Index: in/waeup.sirp/trunk/src/waeup/sirp/browser/test_permissions.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/browser/test_permissions.py	(revision 6642)
+++ 	(revision )
@@ -1,104 +1,0 @@
-"""
-Permission tests.
-
-Check accessibility of views, pages, viewlets.
-
-:test-layer: python
-
-"""
-import shutil
-import tempfile
-from zope.app.testing.functional import FunctionalTestCase
-from zope.app.testing.functional import HTTPCaller as http
-from zope.component import createObject
-from zope.component.hooks import setSite
-from zope.security.interfaces import Unauthorized
-from zope.testbrowser.testing import Browser
-from waeup.sirp.testing import FunctionalLayer
-from waeup.sirp.app import University
-
-manager_pages = [
-    # The pages that should only be accessible by manager...
-    '/@@manage', '/@@administration', '/faculties/@@search',
-    '/users/@@index', '/users/@@add', '/users/alice/@@index',
-    '/datacenter/@@index', '/datacenter/@@upload', '/datacenter/@@import1',
-    '/datacenter/@@import2', '/datacenter/@@import3', '/datacenter/@@import4',
-    '/datacenter/@@logs', '/datacenter/@@show', '/datacenter/@@manage',
-    '/faculties/@@index', '/faculties/@@add', '/faculties/@@manage',
-    '/faculties/fac1/@@index', '/faculties/fac1/@@manage',
-    '/faculties/fac1/@@add',
-    '/faculties/fac1/dept1/@@index',
-    '/faculties/fac1/dept1/@@manage',
-    '/faculties/fac1/dept1/@@addcourse',
-    '/faculties/fac1/dept1/@@addcertificate',
-    '/faculties/fac1/dept1/courses/crs1/@@index',
-    '/faculties/fac1/dept1/courses/crs1/@@manage',
-    '/faculties/fac1/dept1/certificates/cert1/@@index',
-    '/faculties/fac1/dept1/certificates/cert1/@@manage',
-    '/faculties/fac1/dept1/certificates/cert1/@@addcertificatecourse',
-    '/faculties/fac1/dept1/certificates/cert1/crs1_100/@@index',
-    '/faculties/fac1/dept1/certificates/cert1/crs1_100/@@manage',
-    ]
-public_pages = [
-    # Pages accessible also by the public...
-    '/@@index', '/@@login','/@@loginstaff', '/@@loginstudent', '/@@logout',
-    ]
-
-class PermissionTest(FunctionalTestCase):
-    """Here we try to request all pages and check, whether they are
-    accessible.
-    """
-
-    layer = FunctionalLayer
-
-    def setUp(self):
-        super(PermissionTest, self).setUp()
-
-        # Set up a complete university to have every page available...
-        app = University()
-        self.getRootFolder()['app'] = app
-        setSite(self.getRootFolder()['app'])
-        self.dc_root = tempfile.mkdtemp()
-        app['datacenter'].setStoragePath(self.dc_root)
-        app['users'].addUser('alice', 'alice')
-        fac1 = createObject('waeup.Faculty')
-        fac1.code = "fac1"
-        app['faculties'].addFaculty(fac1)
-        dept = createObject('waeup.Department')
-        dept.code = 'dept1'
-        fac1.addDepartment(dept)
-        course = createObject('waeup.Course')
-        course.code = 'crs1'
-        dept.courses.addCourse(course)
-        cert = createObject('waeup.Certificate')
-        cert.code = 'cert1'
-        dept.certificates.addCertificate(cert)
-        cert.addCourseRef(course)
-
-        self.browser = Browser()
-        self.browser.handleErrors = False
-        pass
-
-    def cleanUp(self):
-        super(ManagerTest, self).cleanUp()
-        shutil.rmtree(self.dc_root)
-
-    def isAccessible(self, path):
-        path = 'http://localhost/app%s' % path
-        try:
-            self.browser.open(path)
-            return True
-        except Unauthorized:
-            return False
-        return
-
-    def testUnauthenticatedUser(self):
-        for path in manager_pages:
-            if not self.isAccessible(path):
-                continue
-            self.fail('Path %s can be accessed by anonymous.' % path)
-        for path in public_pages:
-            if self.isAccessible(path):
-                continue
-            self.fail('Path %s cannot be accessed by anonymous.' % path)
-        return
Index: /main/waeup.sirp/trunk/src/waeup/sirp/browser/tests/__init__.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/browser/tests/__init__.py	(revision 6643)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/browser/tests/__init__.py	(revision 6643)
@@ -0,0 +1,1 @@
+# Make this a package.
Index: /main/waeup.sirp/trunk/src/waeup/sirp/browser/tests/test_permissions.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/browser/tests/test_permissions.py	(revision 6643)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/browser/tests/test_permissions.py	(revision 6643)
@@ -0,0 +1,125 @@
+##
+## test_batching.py
+## Login : <uli@pu.smp.net>
+## Started on  Tue Aug 24 02:04:44 2010 Uli Fouquet
+## $Id$
+##
+## Copyright (C) 2010 Uli Fouquet
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+"""
+Permission tests.
+
+Check accessibility of views, pages, viewlets.
+
+:test-layer: python
+
+"""
+import shutil
+import tempfile
+from zope.app.testing.functional import FunctionalTestCase
+from zope.app.testing.functional import HTTPCaller as http
+from zope.component import createObject
+from zope.component.hooks import setSite
+from zope.security.interfaces import Unauthorized
+from zope.testbrowser.testing import Browser
+from waeup.sirp.testing import FunctionalLayer
+from waeup.sirp.app import University
+
+manager_pages = [
+    # The pages that should only be accessible by manager...
+    '/@@manage', '/@@administration', '/faculties/@@search',
+    '/users/@@index', '/users/@@add', '/users/alice/@@index',
+    '/datacenter/@@index', '/datacenter/@@upload', '/datacenter/@@import1',
+    '/datacenter/@@import2', '/datacenter/@@import3', '/datacenter/@@import4',
+    '/datacenter/@@logs', '/datacenter/@@show', '/datacenter/@@manage',
+    '/faculties/@@index', '/faculties/@@add', '/faculties/@@manage',
+    '/faculties/fac1/@@index', '/faculties/fac1/@@manage',
+    '/faculties/fac1/@@add',
+    '/faculties/fac1/dept1/@@index',
+    '/faculties/fac1/dept1/@@manage',
+    '/faculties/fac1/dept1/@@addcourse',
+    '/faculties/fac1/dept1/@@addcertificate',
+    '/faculties/fac1/dept1/courses/crs1/@@index',
+    '/faculties/fac1/dept1/courses/crs1/@@manage',
+    '/faculties/fac1/dept1/certificates/cert1/@@index',
+    '/faculties/fac1/dept1/certificates/cert1/@@manage',
+    '/faculties/fac1/dept1/certificates/cert1/@@addcertificatecourse',
+    '/faculties/fac1/dept1/certificates/cert1/crs1_100/@@index',
+    '/faculties/fac1/dept1/certificates/cert1/crs1_100/@@manage',
+    ]
+public_pages = [
+    # Pages accessible also by the public...
+    '/@@index', '/@@login','/@@loginstaff', '/@@loginstudent', '/@@logout',
+    ]
+
+class PermissionTest(FunctionalTestCase):
+    """Here we try to request all pages and check, whether they are
+    accessible.
+    """
+
+    layer = FunctionalLayer
+
+    def setUp(self):
+        super(PermissionTest, self).setUp()
+
+        # Set up a complete university to have every page available...
+        app = University()
+        self.getRootFolder()['app'] = app
+        setSite(self.getRootFolder()['app'])
+        self.dc_root = tempfile.mkdtemp()
+        app['datacenter'].setStoragePath(self.dc_root)
+        app['users'].addUser('alice', 'alice')
+        fac1 = createObject('waeup.Faculty')
+        fac1.code = "fac1"
+        app['faculties'].addFaculty(fac1)
+        dept = createObject('waeup.Department')
+        dept.code = 'dept1'
+        fac1.addDepartment(dept)
+        course = createObject('waeup.Course')
+        course.code = 'crs1'
+        dept.courses.addCourse(course)
+        cert = createObject('waeup.Certificate')
+        cert.code = 'cert1'
+        dept.certificates.addCertificate(cert)
+        cert.addCourseRef(course)
+
+        self.browser = Browser()
+        self.browser.handleErrors = False
+        pass
+
+    def cleanUp(self):
+        super(ManagerTest, self).cleanUp()
+        shutil.rmtree(self.dc_root)
+
+    def isAccessible(self, path):
+        path = 'http://localhost/app%s' % path
+        try:
+            self.browser.open(path)
+            return True
+        except Unauthorized:
+            return False
+        return
+
+    def testUnauthenticatedUser(self):
+        for path in manager_pages:
+            if not self.isAccessible(path):
+                continue
+            self.fail('Path %s can be accessed by anonymous.' % path)
+        for path in public_pages:
+            if self.isAccessible(path):
+                continue
+            self.fail('Path %s cannot be accessed by anonymous.' % path)
+        return
