generated from john/python-template
@@ -32,4 +32,5 @@ class TestPageRegistration:
|
||||
assert "Tags" in settings_response.text
|
||||
assert "Prompts" in settings_response.text
|
||||
assert "Home Page Text" in settings_response.text
|
||||
assert "Other settings not shown here" in settings_response.text
|
||||
assert "README.md" not in settings_response.text
|
||||
|
||||
@@ -8,6 +8,7 @@ import pytest
|
||||
|
||||
from transcription.config import Settings
|
||||
from transcription.errors import AppError
|
||||
from transcription.ui.runtime_settings_store import HIDDEN_SETTINGS_CATEGORIES
|
||||
from transcription.ui.runtime_settings_store import RUNTIME_SETTINGS_CATALOG
|
||||
from transcription.ui.runtime_settings_store import SETTINGS_UI_EXCLUDED_FIELDS
|
||||
from transcription.ui.runtime_settings_store import read_runtime_settings_snapshot
|
||||
@@ -28,6 +29,14 @@ def test_runtime_settings_catalog_classifies_all_non_secret_settings_fields():
|
||||
assert "openrouter_api_key" not in settings_catalog_field_names()
|
||||
|
||||
|
||||
def test_hidden_settings_categories_list_secret_and_high_risk_env_keys():
|
||||
hidden_keys = {key for category in HIDDEN_SETTINGS_CATEGORIES for key in category.env_keys}
|
||||
assert "OPENROUTER_API_KEY" in hidden_keys
|
||||
assert "DATABASE__PASSWORD" in hidden_keys
|
||||
assert "DATABASE__DRIVER" in hidden_keys
|
||||
assert "DATABASE__HOST" in hidden_keys
|
||||
|
||||
|
||||
def test_runtime_settings_snapshot_includes_catalog_fields(tmp_path: Path):
|
||||
settings = _settings_for_runtime_editing(tmp_path)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user