def test_bad_response_from_app(self):

        _stdout = StringIO()

        class RootController(object):
            @expose()
            def index(self):
                return 'Hello, World!'

        app = TestApp(
            make_app(
                RootController(), hooks=lambda: [
                    RequestViewerHook(writer=_stdout)
                ]
            )
        )
        response = app.get('/404', expect_errors=True)

        out = _stdout.getvalue()

        assert response.status_int == 404
        assert 'path' in out
        assert 'method' in out
        assert 'status' in out
        assert 'method' in out
        assert 'params' in out
        assert 'hooks' in out
        assert '404 Not Found' in out
        assert "['RequestViewerHook']" in out
        assert '/' in out
Cleanse an individual setting key/value of sensitive content.
dataset/ETHPy150Open pecan/pecan/pecan/tests/test_hooks.py/TestRequestViewerHook.test_bad_response_from_app--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/views/debug.py/cleanse_setting