class_docstr: Test how very generic handlers are dispatched to.
class_docstr_tok: ["Test","how","very","generic","handlers","are","dispatched","to","."]
docstr: ``HTTPException`` should only receive ``HTTPException``
  subclasses. It will receive ``404`` routing exceptions.
docstr_tok: ["``","HTTPException","``","should","only","receive","``","HTTPException","``","subclasses",".","It","will","receive","``","404","``","routing","exceptions","."]
code: def test_handle_generic_http(self, app, client):
      """``HTTPException`` should only receive ``HTTPException``
      subclasses. It will receive ``404`` routing exceptions.
      """
  
      @app.errorhandler(HTTPException)
      def handle_http(e):
          assert isinstance(e, HTTPException)
          return str(e.code)
  
      assert client.get("/error").data == b"500"
      assert client.get("/abort").data == b"500"
      assert client.get("/not-found").data == b"404"
  
file_path: flask/tests/test_user_error_handler.py
imports: import pytest
  from werkzeug.exceptions import Forbidden
  from werkzeug.exceptions import HTTPException
  from werkzeug.exceptions import InternalServerError
  from werkzeug.exceptions import NotFound
  import flask
label_desc: Use image node_id 4 for calling the TestGenericHandlers obj's underlying member method code with example usage: obj.test_handle_generic_http(app, client) and returns: str