Improve the code example in testing docs

This commit is contained in:
Frank Yu 2021-06-19 23:23:12 +08:00 committed by GitHub
parent aac67289e5
commit 40ec39e521
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -333,7 +333,7 @@ happen. With Flask 0.4 this is possible by using the
with app.test_client() as c:
rv = c.get('/?tequila=42')
assert request.args['tequila'] == '42'
assert flask.request.args['tequila'] == '42'
If you were to use just the :meth:`~flask.Flask.test_client` without
the ``with`` block, the ``assert`` would fail with an error because `request`