diff options
| author | Dennis Fink | 2026-10-25 22:26:40 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-10-25 22:26:40 +0100 |
| commit | ce802830c37565d325ba2ecc060443550abb1955 (patch) | |
| tree | b2cdf65353b1eb28d2c8d394b0dcd24461c4db6c /tests/forms/test_validators.py | |
| parent | a231913ab273f427697f2d27d615b495f6e160bb (diff) | |
| download | webmentions-ssg-ce802830c37565d325ba2ecc060443550abb1955.tar.gz webmentions-ssg-ce802830c37565d325ba2ecc060443550abb1955.zip | |
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.
Diffstat (limited to 'tests/forms/test_validators.py')
| -rw-r--r-- | tests/forms/test_validators.py | 6 |
1 files changed, 3 insertions, 3 deletions
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(), |
