Skip to content
Myr

Merge pull request #1343 from cvrebert/test_request_preprocessing_early_return

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

make test_request_preprocessing_early_return more thorough

authored by Markus Unterwaditzer · committed by Markus Unterwaditzer · parents 1158e22, 6d2c076 · Browse files · 1 file+12 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+12 added−2 removed

  • tests:+12 added−2 removed

1 file+12 added−2 removed

modified:tests/test_basic.py+12 added-2 removed
578 unmodified lines
579 app = flask.Flask(__name__)580 evts = []581582 @app.before_request583 def before_request():583 def before_request1():584 evts.append(1)585586 @app.before_request587 def before_request2():588 evts.append(2)589 return "hello"590591 @app.before_request592 def before_request3():593 evts.append(3)594 return "bye"595596 @app.route('/')597 def index():598 evts.append('index')599 return "damnit"600601 rv = app.test_client().get('/').data.strip()602 assert rv == b'hello'593 assert not evts603 assert evts == [1, 2]604605606def test_after_request_processing():607 app = flask.Flask(__name__)
999 unmodified lines