summaryrefslogtreecommitdiff
path: root/pecan/tests/test_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'pecan/tests/test_base.py')
-rw-r--r--pecan/tests/test_base.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/pecan/tests/test_base.py b/pecan/tests/test_base.py
index 785b522..44f87db 100644
--- a/pecan/tests/test_base.py
+++ b/pecan/tests/test_base.py
@@ -1957,6 +1957,18 @@ class TestEngines(PecanTestCase):
result = dict(json.loads(r.body.decode()))
assert result == {'name': 'Bill'}
+ def test_default_json_renderer_with_explicit_content_type(self):
+
+ class RootController(object):
+ @expose(content_type='text/plain')
+ def index(self, name='Bill'):
+ return name
+
+ app = TestApp(Pecan(RootController(), default_renderer='json'))
+ r = app.get('/')
+ assert r.status_int == 200
+ assert r.body == b_("Bill")
+
class TestDeprecatedRouteMethod(PecanTestCase):