Skip to content
Myr

Merge pull request #4972 from pallets/docs-push-reqctx

Before adoption: this commit came in with the history the project adopted, so no landing records it.

fix test client arg for query string example

authored by David Lord · committed by GitHub · parents 129568f, ba2b309 · Browse files · 1 file+3 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−2 removed

  • other:+3 added−2 removed

1 file+3 added−2 removed

modified:docs/reqcontext.rst+3 added-2 removed
67 unmodified lines
68everything that runs in the block will have access to :data:`request`,69populated with your test data. ::7071 def generate_report(year):72 format = request.args.get('format')72 format = request.args.get("format")73 ...7475 with app.test_request_context(76 '/make_report/2017', data={'format': 'short'}):76 "/make_report/2017", query_string={"format": "short"}77 ):78 generate_report()7980If you see that error somewhere else in your code not related to81testing, it most likely indicates that you should move that code into a
167 unmodified lines