(app, client)
| 187 | |
| 188 | |
| 189 | def test_methods_var_inheritance(app, client): |
| 190 | class BaseView(flask.views.MethodView): |
| 191 | methods = ["GET", "PROPFIND"] |
| 192 | |
| 193 | class ChildView(BaseView): |
| 194 | def get(self): |
| 195 | return "GET" |
| 196 | |
| 197 | def propfind(self): |
| 198 | return "PROPFIND" |
| 199 | |
| 200 | app.add_url_rule("/", view_func=ChildView.as_view("index")) |
| 201 | |
| 202 | assert client.get("/").data == b"GET" |
| 203 | assert client.open("/", method="PROPFIND").data == b"PROPFIND" |
| 204 | assert ChildView.methods == {"PROPFIND", "GET"} |
| 205 | |
| 206 | |
| 207 | def test_multiple_inheritance(app, client): |
nothing calls this directly
no test coverage detected