From ce802830c37565d325ba2ecc060443550abb1955 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Sun, 25 Oct 2026 22:26:40 +0100 Subject: refactor(core): simplify configuration keys Remove the WEBMENTIONS_SSG prefix from application-specific configuration settings and update validators, tasks, and tests to use the shorter names. --- tests/forms/test_validators.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/forms') diff --git a/tests/forms/test_validators.py b/tests/forms/test_validators.py index c63ee54..6e26039 100644 --- a/tests/forms/test_validators.py +++ b/tests/forms/test_validators.py @@ -46,21 +46,21 @@ def test_not_equal_to_rejects_unknown_field() -> None: def test_allowed_hostname_accepts_configured_hostname(app: Flask) -> None: - app.config["WEBMENTIONS_SSG_ALLOWED_HOSTNAMES"] = ["dennisfink.me"] + app.config["ALLOWED_HOSTNAMES"] = ["dennisfink.me"] form = URLForm(MultiDict({"url": "https://dennisfink.me/blog/example/"})) with app.app_context(): AllowedHostname()(form, form.url) def test_allowed_hostname_rejects_unconfigured_hostname(app: Flask) -> None: - app.config["WEBMENTIONS_SSG_ALLOWED_HOSTNAMES"] = ["dennisfink.me"] + app.config["ALLOWED_HOSTNAMES"] = ["dennisfink.me"] form = URLForm(MultiDict({"url": "https://example.com/post"})) with app.app_context(), pytest.raises(ValidationError, match="Invalid input"): AllowedHostname()(form, form.url) def test_allowed_hostname_uses_custom_message(app: Flask) -> None: - app.config["WEBMENTIONS_SSG_ALLOWED_HOSTNAMES"] = ["dennisfink.me"] + app.config["ALLOWED_HOSTNAMES"] = ["dennisfink.me"] form = URLForm(MultiDict({"url": "https://example.com/post"})) with ( app.app_context(), -- cgit v1.3.1