1052 controller = self.vreg['controllers'].select('undo', req) |
1052 controller = self.vreg['controllers'].select('undo', req) |
1053 with self.assertRaises(Redirect) as cm: |
1053 with self.assertRaises(Redirect) as cm: |
1054 result = controller.publish(rset=None) |
1054 result = controller.publish(rset=None) |
1055 self.assertURLPath(cm.exception.location, rpath) |
1055 self.assertURLPath(cm.exception.location, rpath) |
1056 |
1056 |
1057 def test_redirect_default(self): |
|
1058 with self.admin_access.web_request() as req: |
|
1059 txuuid = self.txuuid_toto_email |
|
1060 req.form['txuuid'] = txuuid |
|
1061 req.session.data['breadcrumbs'] = [ urljoin(req.base_url(), path) |
|
1062 for path in ('tata', 'toto',)] |
|
1063 controller = self.vreg['controllers'].select('undo', req) |
|
1064 with self.assertRaises(Redirect) as cm: |
|
1065 result = controller.publish(rset=None) |
|
1066 self.assertURLPath(cm.exception.location, 'toto') |
|
1067 |
|
1068 |
1057 |
1069 class LoginControllerTC(CubicWebTC): |
1058 class LoginControllerTC(CubicWebTC): |
1070 |
1059 |
1071 def test_login_with_dest(self): |
1060 def test_login_with_dest(self): |
1072 with self.admin_access.web_request() as req: |
1061 with self.admin_access.web_request() as req: |