forked from orbit-oss/flask
Merge pull request #4972 from pallets/docs-push-reqctx
fix test client arg for query string example
This commit is contained in:
commit
f425c117e2
1 changed files with 3 additions and 2 deletions
|
|
@ -69,11 +69,12 @@ everything that runs in the block will have access to :data:`request`,
|
||||||
populated with your test data. ::
|
populated with your test data. ::
|
||||||
|
|
||||||
def generate_report(year):
|
def generate_report(year):
|
||||||
format = request.args.get('format')
|
format = request.args.get("format")
|
||||||
...
|
...
|
||||||
|
|
||||||
with app.test_request_context(
|
with app.test_request_context(
|
||||||
'/make_report/2017', data={'format': 'short'}):
|
"/make_report/2017", query_string={"format": "short"}
|
||||||
|
):
|
||||||
generate_report()
|
generate_report()
|
||||||
|
|
||||||
If you see that error somewhere else in your code not related to
|
If you see that error somewhere else in your code not related to
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue