aboutsummaryrefslogtreecommitdiff
path: root/tests/forms/test_sent.py
diff options
context:
space:
mode:
authorDennis Fink2026-11-19 18:15:34 +0100
committerDennis Fink2026-11-19 18:15:34 +0100
commit8ec35babe87ff8139ec23cc10b858b7481f132db (patch)
treeb1e2b2507abba25b570a32e7274b6c0158eac653 /tests/forms/test_sent.py
parent45d3d3fde75173dfbf27e08aae8501842a9511dd (diff)
downloadwebmentions-ssg-8ec35babe87ff8139ec23cc10b858b7481f132db.tar.gz
webmentions-ssg-8ec35babe87ff8139ec23cc10b858b7481f132db.zip
refactor(sender)!: align sent Webmention terminology
Rename source-list forms, views, helpers, and tests around the Sent Webmentions UI while keeping source documents as the grouping model. BREAKING CHANGE: authenticated outgoing routes move from `/sources` to `/sent`, with corresponding blueprint endpoint and Python module renames.
Diffstat (limited to '')
-rw-r--r--tests/forms/test_sent.py (renamed from tests/forms/test_sources.py)24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/forms/test_sources.py b/tests/forms/test_sent.py
index 082b0d3..1cdd463 100644
--- a/tests/forms/test_sources.py
+++ b/tests/forms/test_sent.py
@@ -2,18 +2,18 @@
#
# SPDX-License-Identifier: BSD-3-Clause
-"""Validation of source-list GET filters."""
+"""Validation of sent Webmentions GET filters."""
import pytest
from flask import Flask
from werkzeug.datastructures import MultiDict
-from webmentions_ssg.forms.sources import SourceFilterForm
+from webmentions_ssg.forms.sent import SentFilterForm
-def test_source_filter_form_accepts_get_params(app: Flask) -> None:
- with app.test_request_context("/sources"):
- form = SourceFilterForm(
+def test_sent_filter_form_accepts_get_params(app: Flask) -> None:
+ with app.test_request_context("/sent"):
+ form = SentFilterForm(
formdata=MultiDict(
{
"status": "retrying",
@@ -55,19 +55,19 @@ def test_source_filter_form_accepts_get_params(app: Flask) -> None:
{"date_from": "2026-11-15", "date_to": "2026-11-08"},
],
)
-def test_source_filter_form_rejects_bad_get_params(
+def test_sent_filter_form_rejects_bad_get_params(
app: Flask, data: dict[str, str]
) -> None:
- with app.test_request_context("/sources"):
- form = SourceFilterForm(formdata=MultiDict(data), meta={"csrf": False})
+ with app.test_request_context("/sent"):
+ form = SentFilterForm(formdata=MultiDict(data), meta={"csrf": False})
assert not form.validate()
assert form.errors
-def test_source_filter_form_defaults_and_configured_maximum(app: Flask) -> None:
+def test_sent_filter_form_defaults_and_configured_maximum(app: Flask) -> None:
app.config["SOURCES_MAX_PAGE_SIZE"] = 10
- with app.test_request_context("/sources"):
- form = SourceFilterForm(formdata=MultiDict(), meta={"csrf": False})
+ with app.test_request_context("/sent"):
+ form = SentFilterForm(formdata=MultiDict(), meta={"csrf": False})
assert form.validate()
assert (
form.status.data,
@@ -75,7 +75,7 @@ def test_source_filter_form_defaults_and_configured_maximum(app: Flask) -> None:
form.order.data,
form.per_page.data,
) == ("", "last_seen", "desc", 10)
- form = SourceFilterForm(
+ form = SentFilterForm(
formdata=MultiDict({"per_page": "11"}), meta={"csrf": False}
)
assert not form.validate()