summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pyramid/tests/test_httpexceptions.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pyramid/tests/test_httpexceptions.py b/pyramid/tests/test_httpexceptions.py
index 224fa4cf0..e2d463008 100644
--- a/pyramid/tests/test_httpexceptions.py
+++ b/pyramid/tests/test_httpexceptions.py
@@ -2,6 +2,7 @@ import unittest
from pyramid.compat import (
bytes_,
+ string_types,
text_,
)
@@ -364,6 +365,11 @@ class TestHTTPException(unittest.TestCase):
body = list(exc(environ, start_response))[0]
self.assertEqual(body, b'200 OK\n\n/La Pe\xc3\xb1a')
+ def test_allow_detail_non_str(self):
+ exc = self._makeOne(detail={'error': 'This is a test'})
+ self.assertIsInstance(exc.__str__(), string_types)
+
+
class TestRenderAllExceptionsWithoutArguments(unittest.TestCase):
def _doit(self, content_type):
from pyramid.httpexceptions import status_map