def test_abort_with_response() -> None: with pytest.raises(HTTPException) as exc_info: abort(Response("Message", 205)) assert exc_info.value.get_response().status_code == 205
def test_abort() -> None: with pytest.raises(HTTPStatusException): abort(400)
def test_abort_with_arguments() -> None: with pytest.raises(HTTPException) as exc_info: abort(400, "A description", "A name") assert exc_info.value.description == "A description"