Skip to content

Commit

Permalink
fix test client arg for query string example
Browse files Browse the repository at this point in the history
  • Loading branch information
davidism committed Feb 10, 2023
1 parent 129568f commit ba2b309
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/reqcontext.rst
Original file line number Diff line number Diff line change
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 ba2b309

Please sign in to comment.