From c5492398f100ccb154fa557d657bae2322f95cf7 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Fri, 21 Aug 2026 10:37:56 +0200 Subject: test(core): align tests with module ownership Move direct validator, model, and Huey extension coverage into dedicated test modules and mock dependencies where behavior belongs to another module. Expand Huey extension typing and coverage while removing duplicate assertions from scanner, sender, form, and view tests. --- tests/tasks/test_receiver.py | 5 ----- 1 file changed, 5 deletions(-) (limited to 'tests/tasks/test_receiver.py') diff --git a/tests/tasks/test_receiver.py b/tests/tasks/test_receiver.py index 17dd45a..daa271d 100644 --- a/tests/tasks/test_receiver.py +++ b/tests/tasks/test_receiver.py @@ -54,9 +54,7 @@ def create_webmention( def get_webmention_state(app: Flask, identifier: uuid.UUID) -> tuple[str, str | None]: with app.app_context(): webmention = db.session.get(ReceivedWebmention, identifier) - assert webmention is not None - return (webmention.status, webmention.failure_reason) @@ -433,9 +431,7 @@ def test_verify_webmention_marks_row_verifying_before_check( return True source_mentions_target.side_effect = verify_source - receiver.verify_webmention.call_local(identifier) - assert get_webmention_state(app, identifier) == ("verified", None) @@ -521,7 +517,6 @@ def test_ensure_public_request_accepts_public_url( is_public_url: Mock, receiver: ModuleType ) -> None: receiver.ensure_public_request(httpx.Request("GET", SOURCE_URL)) - is_public_url.assert_called_once_with(SOURCE_URL) -- cgit v1.3.1