Index: /main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_browser.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_browser.py	(revision 5888)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_browser.py	(revision 5888)
@@ -0,0 +1,73 @@
+##
+## test_browser.py
+## Login : <uli@pu.smp.net>
+## Started on  Tue Mar 29 11:31:11 2011 Uli Fouquet
+## $Id$
+## 
+## Copyright (C) 2011 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
+##
+"""
+Test the applicant-related UI components.
+"""
+import shutil
+import tempfile
+import unittest
+from zope.app.testing.functional import FunctionalTestCase
+from zope.app.testing.functional import HTTPCaller as http
+from zope.component import createObject
+from zope.security.interfaces import Unauthorized
+from zope.testbrowser.testing import Browser
+from waeup.sirp.testing import FunctionalLayer
+from waeup.sirp.app import University
+from waeup.sirp.applicants.container import ApplicantsContainer
+
+class LoginTest(FunctionalTestCase):
+    # Here we check login functionality.
+    
+    layer = FunctionalLayer
+    
+    def setUp(self):
+        super(LoginTest, self).setUp()
+        app = University()
+        self.dc_root = tempfile.mkdtemp()
+        app['datacenter'].setStoragePath(self.dc_root)
+        app['applicants']['testapplicants'] = ApplicantsContainer()
+        
+        self.getRootFolder()['app'] = app
+        self.browser = Browser()
+        self.browser.handleErrors = False
+
+    def tearDown(self):
+        super(LoginTest, self).tearDown()
+        shutil.rmtree(self.dc_root)
+
+    def test_anonymous_access(self):
+        # Anonymous users can access a login page
+        path = 'http://localhost/app/applicants/testapplicants/login'
+        self.browser.open(path)
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        return
+
+def suite():
+    suite = unittest.TestSuite()
+    for testcase in [
+        LoginTest,
+            ]:
+        suite.addTests(unittest.makeSuite(testcase))
+    return suite
+
+test_suite = suite
+
