devtools/testlib.py
branchstable
changeset 4719 aaed3f813ef8
parent 4690 0cfb6b63f90b
child 4835 13b0b96d7982
child 4916 4b8cdda342ae
equal deleted inserted replaced
4718:3dc3ad02d091 4719:aaed3f813ef8
   472     def expect_redirect(self, callback, req):
   472     def expect_redirect(self, callback, req):
   473         """call the given callback with req as argument, expecting to get a
   473         """call the given callback with req as argument, expecting to get a
   474         Redirect exception
   474         Redirect exception
   475         """
   475         """
   476         try:
   476         try:
   477             res = callback(req)
   477             callback(req)
   478         except Redirect, ex:
   478         except Redirect, ex:
   479             try:
   479             try:
   480                 path, params = ex.location.split('?', 1)
   480                 path, params = ex.location.split('?', 1)
   481             except ValueError:
   481             except ValueError:
   482                 path = ex.location
   482                 path = ex.location