diff options
Diffstat (limited to 'pecan/tests/test_base.py')
-rw-r--r-- | pecan/tests/test_base.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pecan/tests/test_base.py b/pecan/tests/test_base.py index e953d90..e42f1da 100644 --- a/pecan/tests/test_base.py +++ b/pecan/tests/test_base.py @@ -1922,6 +1922,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): |