Browse Source

make test_request_preprocessing_early_return more thorough

pull/1343/head
Chris Rebert 10 years ago
parent
commit
6d2c076a3b
  1. 14
      tests/test_basic.py

14
tests/test_basic.py

@ -580,9 +580,19 @@ def test_request_preprocessing_early_return():
evts = []
@app.before_request
def before_request():
def before_request1():
evts.append(1)
@app.before_request
def before_request2():
evts.append(2)
return "hello"
@app.before_request
def before_request3():
evts.append(3)
return "bye"
@app.route('/')
def index():
evts.append('index')
@ -590,7 +600,7 @@ def test_request_preprocessing_early_return():
rv = app.test_client().get('/').data.strip()
assert rv == b'hello'
assert not evts
assert evts == [1, 2]
def test_after_request_processing():

Loading…
Cancel
Save