web/test/unittest_application.py
branchstable
changeset 2267 e1d2df3f1091
parent 1977 606923dff11b
child 2661 f8df42c9da6b
--- a/web/test/unittest_application.py	Mon Jul 06 09:33:36 2009 +0200
+++ b/web/test/unittest_application.py	Mon Jul 06 09:34:40 2009 +0200
@@ -307,7 +307,7 @@
         self.assertEquals(cnx.password, origcnx.password)
         self.assertEquals(cnx.anonymous_connection, False)
         self.assertEquals(path, 'view')
-        self.assertEquals(params, {'__message': 'welcome %s !' % origcnx.login})
+        self.assertEquals(params, {'__message': 'welcome %s !' % cnx.user().login})
 
     def _test_auth_fail(self, req):
         self.assertRaises(AuthenticationError, self.app.connect, req)
@@ -351,8 +351,8 @@
         req.form['__password'] = origcnx.password
         self._test_auth_fail(req)
         # option allow-email-login set
+        origcnx.login = address
         self.set_option('allow-email-login', True)
-        req, origcnx = self._init_auth('cookie')
         req.form['__login'] = address
         req.form['__password'] = origcnx.password
         self._test_auth_succeed(req, origcnx)