def test_sanitize_http_wgi_env(http_test_data):
    result = processors.sanitize_http_wsgi_env(None, http_test_data)

    assert result['context']['request']['env'] == {
        'foo': 'bar',
        'password': processors.MASK,
        'the_secret': processors.MASK,
        'a_password_here': processors.MASK,
    }
Exemplo n.º 2
0
def test_sanitize_http_wgi_env(http_test_data):
    result = processors.sanitize_http_wsgi_env(None, http_test_data)

    assert result["context"]["request"]["env"] == {
        "foo": "bar",
        "password": processors.MASK,
        "the_secret": processors.MASK,
        "a_password_here": processors.MASK,
    }
Exemplo n.º 3
0
def test_sanitize_http_wgi_env(elasticapm_client, custom_env, http_test_data):
    result = processors.sanitize_http_wsgi_env(elasticapm_client, http_test_data)
    expected = {
        "foo": "bar",
        "password": processors.MASK,
        "secret": processors.MASK,
    }
    expected.update(custom_env)
    assert result["context"]["request"]["env"] == expected