Spaces:
Running on Zero
Running on Zero
Download tests/test_logging.py from deveshc23/drift-quant: direct link, hf CLI and curl.
- Browser
- Download file 447 Bytes
-
https://huggingface.co/spaces/deveshc23/drift-quant/resolve/main/tests/test_logging.py
- Command line
-
hf download hf://spaces/deveshc23/drift-quant/tests/test_logging.py
-
curl -L -o test_logging.py https://huggingface.co/spaces/deveshc23/drift-quant/resolve/main/tests/test_logging.py
447 Bytes
| 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", | |
| } | |