add config and docs for limits
This commit is contained in:
parent
62c56e08c4
commit
c7a53888a1
7 changed files with 231 additions and 33 deletions
|
|
@ -1538,27 +1538,6 @@ def test_werkzeug_passthrough_errors(
|
|||
app.run(debug=debug, use_debugger=use_debugger, use_reloader=use_reloader)
|
||||
|
||||
|
||||
def test_max_content_length(app, client):
|
||||
app.config["MAX_CONTENT_LENGTH"] = 64
|
||||
|
||||
@app.before_request
|
||||
def always_first():
|
||||
flask.request.form["myfile"]
|
||||
AssertionError()
|
||||
|
||||
@app.route("/accept", methods=["POST"])
|
||||
def accept_file():
|
||||
flask.request.form["myfile"]
|
||||
AssertionError()
|
||||
|
||||
@app.errorhandler(413)
|
||||
def catcher(error):
|
||||
return "42"
|
||||
|
||||
rv = client.post("/accept", data={"myfile": "foo" * 100})
|
||||
assert rv.data == b"42"
|
||||
|
||||
|
||||
def test_url_processors(app, client):
|
||||
@app.url_defaults
|
||||
def add_language_code(endpoint, values):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue