from __future__ import annotations from teamlandkarte_mcp.database.query_logger import normalize_sql, redact_params def test_normalize_sql_collapses_whitespace() -> None: assert normalize_sql("SELECT\n 1\t\tFROM t") == "SELECT 1 FROM t" def test_redact_params_redacts_strings() -> None: assert redact_params(["secret"]) == ("se***et",) assert redact_params(["a"]) == ("***",) assert redact_params([123, None, True]) == (123, None, True)