from paste.fixture import TestApp from rhubarbtart import TartRootController, expose, request class SimpleError(TartRootController): def index(self, arg): return arg index.exposed = True simpleerrortest = TestApp(SimpleError()) def test_simpleerror(): res = simpleerrortest.get('/', dict(arg='test')) assert 'test' in res try: res = simpleerrortest.get('/') except TypeError, e: assert 'got' in str(e)