aboutsummaryrefslogtreecommitdiff
path: root/tests/tasks/test_json_serializer.py
diff options
context:
space:
mode:
authorDennis Fink2026-11-15 20:42:20 +0100
committerDennis Fink2026-11-15 20:42:20 +0100
commit509d93b2976e353d29441a7a7b7e78ca466dc4fd (patch)
tree753e637aefabd4293f808addbf9c310eaf0aa552 /tests/tasks/test_json_serializer.py
parentc74feda222745ab7cca8993df83d9ea5f9d07e5b (diff)
downloadwebmentions-ssg-509d93b2976e353d29441a7a7b7e78ca466dc4fd.tar.gz
webmentions-ssg-509d93b2976e353d29441a7a7b7e78ca466dc4fd.zip
refactor(core)!: standardize application terminology
Rename configuration keys, task helpers, forms, network utilities, and view endpoints to make their responsibilities and domains more explicit. Align source-management routes and templates with the new terminology and rename the target-matching module and related task abstractions consistently. BREAKING CHANGE: configuration keys have been renamed and sent-source routes move from `/sent` to `/sources`, with corresponding blueprint endpoint changes.
Diffstat (limited to '')
-rw-r--r--tests/tasks/test_json_serializer.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/tasks/test_json_serializer.py b/tests/tasks/test_json_serializer.py
index 1b09783..442e6a9 100644
--- a/tests/tasks/test_json_serializer.py
+++ b/tests/tasks/test_json_serializer.py
@@ -13,14 +13,14 @@ from flask import Flask
from huey.utils import SKIPPED, Error
from webmentions_ssg.tasks.extension import Huey
-from webmentions_ssg.tasks.json_serializer import JSONSerializer
+from webmentions_ssg.tasks.json_serializer import TaggedJSONSerializer
def test_json_is_default_even_for_production_style_broker(app: Flask) -> None:
app.config["HUEY"] = {"immediate": False}
huey = Huey(app)
- assert isinstance(huey.huey.serializer, JSONSerializer)
+ assert isinstance(huey.huey.serializer, TaggedJSONSerializer)
assert huey.huey.serializer.serialize("hello") == b'"hello"'
@@ -52,7 +52,7 @@ def test_uuid_and_retry_message_survive_enqueue_dequeue(app: Flask) -> None:
def test_result_and_error_data_roundtrip() -> None:
- serializer = JSONSerializer()
+ serializer = TaggedJSONSerializer()
identifier = uuid.uuid4()
payload = {
"ids": [identifier],
@@ -65,13 +65,13 @@ def test_result_and_error_data_roundtrip() -> None:
def test_rejects_pickle_payload() -> None:
- serializer = JSONSerializer()
+ serializer = TaggedJSONSerializer()
with pytest.raises((ValueError, UnicodeDecodeError)):
serializer.deserialize(pickle.dumps({"untrusted": True}))
def test_rejects_unknown_and_malformed_types() -> None:
- serializer = JSONSerializer()
+ serializer = TaggedJSONSerializer()
with pytest.raises(ValueError, match="Unsupported Huey JSON type"):
serializer.deserialize(b'{"type":"arbitrary.class","value":{}}')
with pytest.raises(ValueError, match="Invalid Huey JSON data"):