Ejemplo 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
Ejemplo n.º 2
0
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