(app)
| 39 | |
| 40 | |
| 41 | def test_view_patching(app): |
| 42 | class Index(flask.views.MethodView): |
| 43 | def get(self): |
| 44 | raise ZeroDivisionError |
| 45 | |
| 46 | def post(self): |
| 47 | raise ZeroDivisionError |
| 48 | |
| 49 | class Other(Index): |
| 50 | def get(self): |
| 51 | return "GET" |
| 52 | |
| 53 | def post(self): |
| 54 | return "POST" |
| 55 | |
| 56 | view = Index.as_view("index") |
| 57 | view.view_class = Other |
| 58 | app.add_url_rule("/", view_func=view) |
| 59 | common_test(app) |
| 60 | |
| 61 | |
| 62 | def test_view_inheritance(app, client): |
nothing calls this directly
no test coverage detected