From 6d2c076a3bfafc39eed12a5bca41067c60184c77 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Fri, 6 Feb 2015 13:11:23 -0800 Subject: [PATCH] make test_request_preprocessing_early_return more thorough --- tests/test_basic.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/test_basic.py b/tests/test_basic.py index db8a7374..32a712bf 100644 --- a/tests/test_basic.py +++ b/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():