diff options
Diffstat (limited to '')
| -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(), |
