add test case

- add test case
- update CHANGES.rst
This commit is contained in:
IML 2021-06-06 01:29:02 +09:00
parent 5324bac0d2
commit b505e2a7bd
2 changed files with 17 additions and 0 deletions

View file

@ -1,5 +1,14 @@
.. currentmodule:: flask
Version 2.1.1
-------------
Unreleased
- Add specified HTTP method validation.
Version 2.1.0
-------------

View file

@ -2026,3 +2026,11 @@ def test_app_freed_on_zero_refcount():
assert weak() is None
finally:
gc.enable()
def test_validate_http_method_route(app, client):
with pytest.raises(TypeError):
@app.route("/", methods=["BAD_METHOD"])
def bad_method_func():
return "Hello World"