Esempio n. 1
0
def test_remove_stacktrace_locals():
    data = {"exception": {"stacktrace": [{"vars": {"foo": "bar", "password": "******", "secret": "hello"}}]}}
    result = processors.remove_stacktrace_locals(None, data)

    assert "stacktrace" in result["exception"]
    stack = result["exception"]["stacktrace"]
    for frame in stack:
        assert "vars" not in frame
def test_remove_stacktrace_locals():
    data = {
        'exception': {
            'stacktrace': [
                {
                    'vars': {
                        'foo': 'bar',
                        'password': '******',
                        'the_secret': 'hello',
                        'a_password_here': 'hello',
                    },
                }
            ]
        }
    }
    result = processors.remove_stacktrace_locals(None, data)

    assert 'stacktrace' in result['exception']
    stack = result['exception']['stacktrace']
    for frame in stack:
        assert 'vars' not in frame