code: def common_test(app):
      c = app.test_client()
  
      assert c.get("/").data == b"GET"
      assert c.post("/").data == b"POST"
      assert c.put("/").status_code == 405
      meths = parse_set_header(
          c.open("/", method="OPTIONS").headers["Allow"]
      )
      assert sorted(meths) == ["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 1 for calling a global function with example usage: common_test(app) without return types