Files
planet/backend/tests/test_settings_secret_placeholder.py
linkong 93eb41a9f7
Some checks failed
ci / backend (push) Has been cancelled
ci / frontend (push) Has been cancelled
ci / delivery (push) Has been cancelled
release / images (push) Has been cancelled
release: bump version to 0.58.0
Release 0.58.0 includes the Earth high-precision boundary PMTiles/MVT pipeline, standardized Earth boundary source collectors, China POV boundary configuration templates, and removal of the legacy low-precision GeoJSON fallback. It also adds Earth news target-location queueing/archive support, fixes datasource task status visibility, documents the Earth surface depth-spacing rules that prevent far-zoom z-fighting snow/black blocks, and updates bilingual operations/developer docs.
2026-05-15 17:40:07 +08:00

13 lines
543 B
Python

from app.api.v1.settings import _is_secret_placeholder
def test_secret_placeholder_treats_masked_values_as_placeholder():
assert _is_secret_placeholder("••••••••", "••••1234") is True
assert _is_secret_placeholder("********", "") is True
assert _is_secret_placeholder(" * * * ", "") is True
def test_secret_placeholder_preserves_real_keys_with_asterisks():
assert _is_secret_placeholder("sk-live-*real-key*", "") is False
assert _is_secret_placeholder("token_with*embedded*star", "") is False