deprecate before_first_request

This commit is contained in:
David Lord 2022-06-06 10:00:21 -07:00
parent 7a2d5fb6df
commit 96c97dec09
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
6 changed files with 66 additions and 33 deletions

View file

@ -107,10 +107,12 @@ def test_async_before_after_request():
def index():
return ""
@app.before_first_request
async def before_first():
nonlocal app_first_called
app_first_called = True
with pytest.deprecated_call():
@app.before_first_request
async def before_first():
nonlocal app_first_called
app_first_called = True
@app.before_request
async def before():