code: def test_view_inheritance(app, client):
      class Index(flask.views.MethodView):
          def get(self):
              return "GET"
  
          def post(self):
              return "POST"
  
      class BetterIndex(Index):
          def delete(self):
              return "DELETE"
  
      app.add_url_rule("/", view_func=BetterIndex.as_view("index"))
  
      meths = parse_set_header(
          client.open("/", method="OPTIONS").headers["Allow"]
      )
      assert sorted(meths) == [
          "DELETE",
          "GET",
          "HEAD",
          "OPTIONS",
          "POST",
      ]
  
file_path: flask/tests/test_views.py
imports: import pytest
  from werkzeug.http import parse_set_header
  import flask.views
label_desc: Use image node_id 5 for calling a global function with example usage: test_view_inheritance(app, client) and returns: str, str, str