From 63af533d98aac82b6d4f069b217d3e837285508d Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Tue, 17 Nov 2026 22:10:40 +0100 Subject: feat(receiver): explain received Webmention failures Map known verification failures to human-readable explanations and show suggested next steps only for receiver-controlled problems while retaining raw reasons. Return a specific validation error when targets are outside `ALLOWED_TARGET_HOSTNAMES` and reuse the guidance for status history. --- tests/forms/test_validators.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/forms/test_validators.py') diff --git a/tests/forms/test_validators.py b/tests/forms/test_validators.py index 4234552..8822310 100644 --- a/tests/forms/test_validators.py +++ b/tests/forms/test_validators.py @@ -28,7 +28,9 @@ def test_allowed_hostname_accepts_configured_hostname(app: Flask) -> None: def test_allowed_hostname_rejects_unconfigured_hostname(app: Flask) -> None: app.config["ALLOWED_TARGET_HOSTNAMES"] = ["dennisfink.me"] form = URLForm(MultiDict({"url": "https://example.com/post"})) - with app.app_context(), pytest.raises(ValidationError, match="Invalid input"): + with app.app_context(), pytest.raises( + ValidationError, match="Target hostname is not in ALLOWED_TARGET_HOSTNAMES" + ): AllowedTargetHostname()(form, form.url) -- cgit v1.3.1