--- a/web/test/unittest_application.py Thu Mar 01 12:08:35 2012 +0100
+++ b/web/test/unittest_application.py Thu Mar 15 17:42:31 2012 +0100
@@ -308,12 +308,6 @@
self.commit()
self.assertEqual(vreg.property_value('ui.language'), 'en')
- def test_login_not_available_to_authenticated(self):
- req = self.request()
- with self.assertRaises(Unauthorized) as cm:
- self.app_publish(req, 'login')
- self.assertEqual(str(cm.exception), 'log out first')
-
def test_fb_login_concept(self):
"""see data/views.py"""
self.set_auth_mode('cookie', 'anon')
@@ -343,7 +337,10 @@
def test_cookie_auth_no_anon(self):
req, origsession = self.init_authentication('cookie')
self.assertAuthFailure(req)
- form = self.app_publish(req, 'login')
+ try:
+ form = self.app_publish(req, 'login')
+ except Redirect, redir:
+ self.fail('anonymous user should get login form')
self.assertTrue('__login' in form)
self.assertTrue('__password' in form)
self.assertEqual(req.cnx, None)