added test for bad argspec for _lookup

This commit is contained in:
Mark McClain
2011-01-18 14:57:03 -05:00
parent 2117a0ab2f
commit 03eb997b12

View File

@@ -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()