diff options
Diffstat (limited to 'pecan/tests/test_base.py')
-rw-r--r-- | pecan/tests/test_base.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pecan/tests/test_base.py b/pecan/tests/test_base.py index 81471ec..c076139 100644 --- a/pecan/tests/test_base.py +++ b/pecan/tests/test_base.py @@ -1520,6 +1520,19 @@ class TestEngines(PecanTestCase): assert r.status_int == 200 assert b_("<h1>Hello, Jonathan!</h1>") in r.body + def test_default_json_renderer(self): + + class RootController(object): + @expose() + def index(self, name='Bill'): + return dict(name=name) + + app = TestApp(Pecan(RootController(), default_renderer='json')) + r = app.get('/') + assert r.status_int == 200 + result = dict(json.loads(r.body.decode())) + assert result == {'name': 'Bill'} + class TestDeprecatedRouteMethod(PecanTestCase): |