aboutsummaryrefslogtreecommitdiff
path: root/tests/test_models.py
diff options
context:
space:
mode:
authorDennis Fink2026-11-14 19:43:28 +0100
committerDennis Fink2026-11-14 19:43:28 +0100
commitc74feda222745ab7cca8993df83d9ea5f9d07e5b (patch)
treeacc7bf9bd7223f9d685d6c2954c5c90d7a9e36f0 /tests/test_models.py
parente52e554e2d033dd5ef8397617644e90e354f9560 (diff)
downloadwebmentions-ssg-c74feda222745ab7cca8993df83d9ea5f9d07e5b.tar.gz
webmentions-ssg-c74feda222745ab7cca8993df83d9ea5f9d07e5b.zip
refactor(core): use HTTPStatus consistently
Replace numeric HTTP response and assertion codes in views and tests with `HTTPStatus` members so status handling is more descriptive and consistent.
Diffstat (limited to 'tests/test_models.py')
-rw-r--r--tests/test_models.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_models.py b/tests/test_models.py
index 01e2cec..d2b667c 100644
--- a/tests/test_models.py
+++ b/tests/test_models.py
@@ -5,6 +5,7 @@
import uuid
from collections.abc import Callable
from datetime import UTC, datetime
+from http import HTTPStatus
from typing import get_type_hints
import pytest
@@ -318,7 +319,7 @@ def test_resend_requeues_current_revision_without_losing_send_history() -> None:
status=SentWebmentionStatus.FAILED,
failure_reason="Previous failure",
endpoint="https://example.com/webmention",
- response_status=503,
+ response_status=HTTPStatus.SERVICE_UNAVAILABLE,
status_url="https://example.com/status",
attempt_count=3,
next_retry_at=sent_at,