(app)
| 169 | |
| 170 | |
| 171 | def test_endpoint_override(app): |
| 172 | app.debug = True |
| 173 | |
| 174 | class Index(flask.views.View): |
| 175 | methods = ["GET", "POST"] |
| 176 | |
| 177 | def dispatch_request(self): |
| 178 | return flask.request.method |
| 179 | |
| 180 | app.add_url_rule("/", view_func=Index.as_view("index")) |
| 181 | |
| 182 | with pytest.raises(AssertionError): |
| 183 | app.add_url_rule("/", view_func=Index.as_view("index")) |
| 184 | |
| 185 | # But these tests should still pass. We just log a warning. |
| 186 | common_test(app) |
| 187 | |
| 188 | |
| 189 | def test_methods_var_inheritance(app, client): |
nothing calls this directly
no test coverage detected