Exemplo n.º 1
0
def test_handle_http_error_pass(app):
    """Assert that the RoutingException is passed through the handler."""
    with app.app_context():
        err = HTTPException(description='description')
        err.code = 200
        response = errorhandlers.handle_http_error(err)

        assert response.status_code == 200
Exemplo n.º 2
0
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)