From f9813e050988e69b3b972bcc4495671bde2dafa7 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 6 Jun 2019 22:06:40 -0500 Subject: do not reinvoke exception views if an exception hits the execution policy See https://github.com/Pylons/pyramid/issues/3468 --- tests/test_router.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests/test_router.py') diff --git a/tests/test_router.py b/tests/test_router.py index 3e66757f6..722f4286c 100644 --- a/tests/test_router.py +++ b/tests/test_router.py @@ -1561,7 +1561,7 @@ class TestRouter(unittest.TestCase): self.assertEqual(resp.status_code, 200) self.assertEqual(resp.body, b'foo') - def test_execution_policy_handles_exception(self): + def test_execution_policy_bubbles_exception(self): from pyramid.interfaces import IViewClassifier from pyramid.interfaces import IExceptionViewClassifier from pyramid.interfaces import IRequest @@ -1591,8 +1591,7 @@ class TestRouter(unittest.TestCase): environ = self._makeEnviron(PATH_INFO='/archives/action1/article1') start_response = DummyStartResponse() router = self._makeOne() - result = router(environ, start_response) - self.assertEqual(result, ["Hello, world"]) + self.assertRaises(Exception2, lambda: router(environ, start_response)) def test_request_context_with_statement(self): from pyramid.threadlocal import get_current_request -- cgit v1.2.3