web/test/unittest_views_basecontrollers.py
branchstable
changeset 8487 017af22e7678
parent 8444 7a861620f64f
child 8504 f21c72928662
--- a/web/test/unittest_views_basecontrollers.py	Fri Jul 20 15:17:32 2012 +0200
+++ b/web/test/unittest_views_basecontrollers.py	Mon Jul 23 12:45:43 2012 +0200
@@ -843,16 +843,16 @@
 
     def test_login_with_dest(self):
         req = self.request()
-        req.form = {'postlogin_path': '/elephants/babar'}
+        req.form = {'postlogin_path': 'elephants/babar'}
         with self.assertRaises(Redirect) as cm:
             self.ctrl_publish(req, ctrl='login')
-        self.assertEqual('/elephants/babar', cm.exception.location)
+        self.assertEqual(req.build_url('elephants/babar'), cm.exception.location)
 
     def test_login_no_dest(self):
         req = self.request()
         with self.assertRaises(Redirect) as cm:
             self.ctrl_publish(req, ctrl='login')
-        self.assertEqual('.', cm.exception.location)
+        self.assertEqual(req.base_url(), cm.exception.location)
 
 if __name__ == '__main__':
     unittest_main()