From f7462bb5ada798ce38ed9a9f8109ec2564c1d32a Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 16 Sep 2012 13:13:49 -0400 Subject: be very explicit that view_three should indeed obtain a response as the result of invoke_subrequest instead of catching an exception --- pyramid/tests/pkgs/subrequestapp/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pyramid/tests/pkgs/subrequestapp/__init__.py b/pyramid/tests/pkgs/subrequestapp/__init__.py index dceaa9e45..b8f44cd7f 100644 --- a/pyramid/tests/pkgs/subrequestapp/__init__.py +++ b/pyramid/tests/pkgs/subrequestapp/__init__.py @@ -11,8 +11,11 @@ def view_two(request): def view_three(request): subreq = Request.blank('/view_four') - response = request.invoke_subrequest(subreq, use_tweens=True) - return response + try: + return request.invoke_subrequest(subreq, use_tweens=True) + except: # pragma: no cover + request.response.body = b'Value error raised' + return request.response def view_four(request): raise ValueError('foo') -- cgit v1.2.3