def __init__(self, new_url): RoutingException.__init__(self, new_url) self.new_url = new_url
def __init__(self, new_url, code=302): RoutingException.__init__(self, new_url) self.new_url = new_url self.code = code
def test_handle_http_error_pass_through_routing_exception(): # pylint: disable=invalid-name """Assert that the RoutingException is passed through the handler.""" response = errorhandlers.handle_http_error(RoutingException()) assert isinstance(response, RoutingException)
def __init__(self, new_url, code=301): RoutingException.__init__(self, new_url) self.new_url = new_url self.code = code print(request.endpoint)