(app, client)
| 205 | |
| 206 | |
| 207 | def test_multiple_inheritance(app, client): |
| 208 | class GetView(flask.views.MethodView): |
| 209 | def get(self): |
| 210 | return "GET" |
| 211 | |
| 212 | class DeleteView(flask.views.MethodView): |
| 213 | def delete(self): |
| 214 | return "DELETE" |
| 215 | |
| 216 | class GetDeleteView(GetView, DeleteView): |
| 217 | pass |
| 218 | |
| 219 | app.add_url_rule("/", view_func=GetDeleteView.as_view("index")) |
| 220 | |
| 221 | assert client.get("/").data == b"GET" |
| 222 | assert client.delete("/").data == b"DELETE" |
| 223 | assert sorted(GetDeleteView.methods) == ["DELETE", "GET"] |
| 224 | |
| 225 | |
| 226 | def test_remove_method_from_parent(app, client): |
nothing calls this directly
no test coverage detected