(app, client)
| 139 | |
| 140 | |
| 141 | def test_implicit_head(app, client): |
| 142 | class Index(flask.views.MethodView): |
| 143 | def get(self): |
| 144 | return flask.Response("Blub", headers={"X-Method": flask.request.method}) |
| 145 | |
| 146 | app.add_url_rule("/", view_func=Index.as_view("index")) |
| 147 | rv = client.get("/") |
| 148 | assert rv.data == b"Blub" |
| 149 | assert rv.headers["X-Method"] == "GET" |
| 150 | rv = client.head("/") |
| 151 | assert rv.data == b"" |
| 152 | assert rv.headers["X-Method"] == "HEAD" |
| 153 | |
| 154 | |
| 155 | def test_explicit_head(app, client): |
nothing calls this directly
no test coverage detected