(app, client)
| 224 | |
| 225 | |
| 226 | def test_remove_method_from_parent(app, client): |
| 227 | class GetView(flask.views.MethodView): |
| 228 | def get(self): |
| 229 | return "GET" |
| 230 | |
| 231 | class OtherView(flask.views.MethodView): |
| 232 | def post(self): |
| 233 | return "POST" |
| 234 | |
| 235 | class View(GetView, OtherView): |
| 236 | methods = ["GET"] |
| 237 | |
| 238 | app.add_url_rule("/", view_func=View.as_view("index")) |
| 239 | |
| 240 | assert client.get("/").data == b"GET" |
| 241 | assert client.post("/").status_code == 405 |
| 242 | assert sorted(View.methods) == ["GET"] |
| 243 | |
| 244 | |
| 245 | def test_init_once(app, client): |
nothing calls this directly
no test coverage detected