From 03eb997b12f89182ba50e00ace656af48c144881 Mon Sep 17 00:00:00 2001 From: Mark McClain Date: Tue, 18 Jan 2011 14:57:03 -0500 Subject: [PATCH] added test for bad argspec for _lookup --- tests/test_base.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/test_base.py b/tests/test_base.py index 0f83472..02113b6 100644 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -102,7 +102,17 @@ class TestBase(TestCase): r = app.get('/100/name') assert r.status_int == 200 assert r.body == '/100/name' - + + def test_lookup_with_wrong_argspec(self): + class RootController(object): + @expose() + def _lookup(self, someID): + return 'Bad arg spec' + + app = TestApp(Pecan(RootController())) + r = app.get('/foo/bar', expect_errors=True) + r.status_int == 404 + def test_controller_args(self): class RootController(object): @expose()