web/test/unittest_application.py
changeset 9019 e08f9c55dab5
parent 9017 aa709bc6b6c1
child 9039 488255d1cf3b
--- a/web/test/unittest_application.py	Thu Jun 13 18:46:39 2013 +0200
+++ b/web/test/unittest_application.py	Fri Jun 14 13:43:29 2013 +0200
@@ -378,8 +378,8 @@
         req.session = req.cnx = None
 
     def _test_auth_anon(self, req):
-        self.app.connect(req)
-        asession = req.session
+        asession = self.app.get_session(req)
+        req.set_session(asession)
         self.assertEqual(len(self.open_sessions), 1)
         self.assertEqual(asession.login, 'anon')
         self.assertTrue(asession.anonymous_session)
@@ -387,7 +387,8 @@
 
     def _test_anon_auth_fail(self, req):
         self.assertEqual(len(self.open_sessions), 1)
-        self.app.connect(req)
+        session = self.app.get_session(req)
+        req.set_session(session)
         self.assertEqual(req.message, 'authentication failure')
         self.assertEqual(req.session.anonymous_session, True)
         self.assertEqual(len(self.open_sessions), 1)