(app, client)
| 60 | |
| 61 | |
| 62 | def test_view_inheritance(app, client): |
| 63 | class Index(flask.views.MethodView): |
| 64 | def get(self): |
| 65 | return "GET" |
| 66 | |
| 67 | def post(self): |
| 68 | return "POST" |
| 69 | |
| 70 | class BetterIndex(Index): |
| 71 | def delete(self): |
| 72 | return "DELETE" |
| 73 | |
| 74 | app.add_url_rule("/", view_func=BetterIndex.as_view("index")) |
| 75 | |
| 76 | meths = parse_set_header(client.open("/", method="OPTIONS").headers["Allow"]) |
| 77 | assert sorted(meths) == ["DELETE", "GET", "HEAD", "OPTIONS", "POST"] |
| 78 | |
| 79 | |
| 80 | def test_view_decorators(app, client): |
nothing calls this directly
no test coverage detected