diff options
| author | Dennis Fink | 2026-11-18 21:28:28 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-11-18 21:28:28 +0100 |
| commit | f267db9148e3a390a1a2e50fe71ac4675dceaea1 (patch) | |
| tree | 4a8490599493af811d803b575c4fcdc103d1c68b /tests/views/test_endpoint.py | |
| parent | b2b5429bcf008db357d9d65db77ba37f7af908a8 (diff) | |
| download | webmentions-ssg-f267db9148e3a390a1a2e50fe71ac4675dceaea1.tar.gz webmentions-ssg-f267db9148e3a390a1a2e50fe71ac4675dceaea1.zip | |
refactor(core): tighten static typing
Add explicit runtime narrowing in tests and simplify Huey decorator
annotations so static analysis reflects the dynamic task wrapper
behavior.
Clean up URL argument construction and form error updates while
preserving existing application behavior.
Diffstat (limited to '')
| -rw-r--r-- | tests/views/test_endpoint.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/views/test_endpoint.py b/tests/views/test_endpoint.py index cb6f426..bf99ed4 100644 --- a/tests/views/test_endpoint.py +++ b/tests/views/test_endpoint.py @@ -493,7 +493,10 @@ def test_endpoint_records_initial_and_resubmission_events( views_module: ModuleType, monkeypatch: pytest.MonkeyPatch, ) -> None: - from webmentions_ssg.models.received import ReceivedWebmentionStatusEvent + from webmentions_ssg.models.received import ( + ReceivedWebmentionStatus, + ReceivedWebmentionStatusEvent, + ) mock_endpoint_form(views_module, monkeypatch, valid=True) monkeypatch.setattr(views_module, "verify_webmention", Mock()) @@ -510,7 +513,7 @@ def test_endpoint_records_initial_and_resubmission_events( ) ).all() assert [event.action for event in events] == ["Received submission"] - mention.status = "failed" + mention.status = ReceivedWebmentionStatus.FAILED mention.failure_reason = "Previous failure" mention.updated_at = datetime.now(UTC) - timedelta(minutes=11) db.session.commit() |
