Skip to content

Commit

Permalink
Merge pull request #4972 from pallets/docs-push-reqctx
Browse files Browse the repository at this point in the history
fix test client arg for query string example
  • Loading branch information
davidism committed Feb 10, 2023
2 parents 129568f + ba2b309 commit f425c11
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/reqcontext.rst
Expand Up @@ -69,11 +69,12 @@ everything that runs in the block will have access to :data:`request`,
populated with your test data. ::

def generate_report(year):
format = request.args.get('format')
format = request.args.get("format")
...

with app.test_request_context(
'/make_report/2017', data={'format': 'short'}):
"/make_report/2017", query_string={"format": "short"}
):
generate_report()

If you see that error somewhere else in your code not related to
Expand Down

0 comments on commit f425c11

Please sign in to comment.