Spaces:
Sleeping
Sleeping
File size: 447 Bytes
c962775 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | from __future__ import annotations
from drift_quant.logging import REDACTED_VALUE, redact
def test_redact_removes_nested_secret_values() -> None:
payload = {
"api_key": "visible-never",
"nested": {"Authorization": "Bearer visible-never"},
"normal": "safe",
}
assert redact(payload) == {
"api_key": REDACTED_VALUE,
"nested": {"Authorization": REDACTED_VALUE},
"normal": "safe",
}
|