summaryrefslogtreecommitdiff
path: root/tests/test_router.py
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2019-06-06 22:06:40 -0500
committerMichael Merickel <michael@merickel.org>2019-06-06 22:06:40 -0500
commitf9813e050988e69b3b972bcc4495671bde2dafa7 (patch)
treee3fc89b3c5038e69b668f7bcb14cc4f4be280995 /tests/test_router.py
parent0a3f842daadde4ea0f0c5bc007d9a81adb8e5a18 (diff)
downloadpyramid-f9813e050988e69b3b972bcc4495671bde2dafa7.tar.gz
pyramid-f9813e050988e69b3b972bcc4495671bde2dafa7.tar.bz2
pyramid-f9813e050988e69b3b972bcc4495671bde2dafa7.zip
do not reinvoke exception views if an exception hits the execution policy
See https://github.com/Pylons/pyramid/issues/3468
Diffstat (limited to 'tests/test_router.py')
-rw-r--r--tests/test_router.py5
1 files changed, 2 insertions, 3 deletions
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