equal
deleted
inserted
replaced
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 |