diff options
| author | Chris McDonough <chrism@plope.com> | 2012-09-16 13:13:49 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2012-09-16 13:13:49 -0400 |
| commit | f7462bb5ada798ce38ed9a9f8109ec2564c1d32a (patch) | |
| tree | 83c2a2f5a65b89679931ab317a81836b2093b6df | |
| parent | 0966cfb8bd7ac43f8ce3b6dd903b03ae3bab8ac6 (diff) | |
| download | pyramid-f7462bb5ada798ce38ed9a9f8109ec2564c1d32a.tar.gz pyramid-f7462bb5ada798ce38ed9a9f8109ec2564c1d32a.tar.bz2 pyramid-f7462bb5ada798ce38ed9a9f8109ec2564c1d32a.zip | |
be very explicit that view_three should indeed obtain a response as the result of invoke_subrequest instead of catching an exception
| -rw-r--r-- | pyramid/tests/pkgs/subrequestapp/__init__.py | 7 |
1 files 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') |
