diff options
Diffstat (limited to 'test/test_rparse.py')
-rw-r--r-- | test/test_rparse.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_rparse.py b/test/test_rparse.py index 0cb3e373..929d7342 100644 --- a/test/test_rparse.py +++ b/test/test_rparse.py @@ -419,6 +419,13 @@ class TestResponse: assert r.body[:] assert str(r) + def test_checkfunc(self): + s = cStringIO.StringIO() + r = rparse.parse_response({}, "400:b@100k") + def check(req, acts): + return "errmsg" + assert r.serve(s, check=check)["error"] == "errmsg" + def test_render(self): s = cStringIO.StringIO() r = rparse.parse_response({}, "400'msg'") |