def test_web_debugger(self):
        # create a failure instance with an actual traceback:
        foo = 42 # this will become part of the debuggers namespace
        try:
            raise Exception()
        except Exception as e:
            f = util.NonCleaningFailure()

        web_debugger = web_provider.WebDebugger(f)

        request = DummyRequest([])
        request.addArg('expr', 'foo')
        result = web_debugger.render(request)

        # the result should be json-encoded
        self.assertEquals(result, json.dumps('42\n'))