diff options
| author | Dennis Fink | 2026-11-17 17:09:59 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-11-17 17:09:59 +0100 |
| commit | 6d6d079a3a99d3d3a922a640b6925eb2adf044de (patch) | |
| tree | 33cc19241f4ce86ea43b2f194087c58e3fdc8a4d /tests/tasks | |
| parent | 227092b57acc886469e16bcc4c0d3256e86d3d1e (diff) | |
| download | webmentions-ssg-6d6d079a3a99d3d3a922a640b6925eb2adf044de.tar.gz webmentions-ssg-6d6d079a3a99d3d3a922a640b6925eb2adf044de.zip | |
refactor(core)!: split forms and models by feature
Replace monolithic form and model modules with focused packages for
receiver, moderation, source, user, and shared validation concerns.
Rename source policy concepts to domain moderation, including routes,
models, tables, configuration, templates, and tests.
BREAKING CHANGE: form and model import paths, moderation routes, and
`SOURCE_ALLOWLIST_ENABLED` have changed; use `ALLOWLIST_ENABLED` and the
new feature-specific modules.
Diffstat (limited to 'tests/tasks')
| -rw-r--r-- | tests/tasks/test_notifications.py | 2 | ||||
| -rw-r--r-- | tests/tasks/test_retention.py | 2 | ||||
| -rw-r--r-- | tests/tasks/test_scanner.py | 6 | ||||
| -rw-r--r-- | tests/tasks/test_sender.py | 6 | ||||
| -rw-r--r-- | tests/tasks/test_verification.py | 5 |
5 files changed, 15 insertions, 6 deletions
diff --git a/tests/tasks/test_notifications.py b/tests/tasks/test_notifications.py index ca89a7a..dadec3e 100644 --- a/tests/tasks/test_notifications.py +++ b/tests/tasks/test_notifications.py @@ -13,7 +13,7 @@ from huey.exceptions import TaskLockedException from webmentions_ssg import db from webmentions_ssg.extensions import huey -from webmentions_ssg.models import ReceivedWebmention +from webmentions_ssg.models.received import ReceivedWebmention @pytest.fixture diff --git a/tests/tasks/test_retention.py b/tests/tasks/test_retention.py index 70ab0e0..a3891a9 100644 --- a/tests/tasks/test_retention.py +++ b/tests/tasks/test_retention.py @@ -11,7 +11,7 @@ import sqlalchemy as sa from flask import Flask from webmentions_ssg import db -from webmentions_ssg.models import ReceivedWebmention +from webmentions_ssg.models.received import ReceivedWebmention from webmentions_ssg.tasks.retention import purge_old_received_webmentions diff --git a/tests/tasks/test_scanner.py b/tests/tasks/test_scanner.py index 4cf2a67..dbeeac9 100644 --- a/tests/tasks/test_scanner.py +++ b/tests/tasks/test_scanner.py @@ -17,7 +17,11 @@ from huey.exceptions import RetryTask from pytest import MonkeyPatch from webmentions_ssg import db -from webmentions_ssg.models import SentWebmention, SentWebmentionStatus, SourceDocument +from webmentions_ssg.models.sources import ( + SentWebmention, + SentWebmentionStatus, + SourceDocument, +) from webmentions_ssg.tasks import source_parser from .scanner_helpers import BASE_URL, SOURCE_URL, configure_scanner, write_post diff --git a/tests/tasks/test_sender.py b/tests/tasks/test_sender.py index 9a0430c..0d68933 100644 --- a/tests/tasks/test_sender.py +++ b/tests/tasks/test_sender.py @@ -14,7 +14,11 @@ import pytest from flask import Flask from webmentions_ssg import db -from webmentions_ssg.models import SentWebmention, SentWebmentionStatus, SourceDocument +from webmentions_ssg.models.sources import ( + SentWebmention, + SentWebmentionStatus, + SourceDocument, +) SOURCE_URL = "https://dennisfink.me/blog/example/" TARGET_URL = "https://example.com/post" diff --git a/tests/tasks/test_verification.py b/tests/tasks/test_verification.py index c5550c8..3547464 100644 --- a/tests/tasks/test_verification.py +++ b/tests/tasks/test_verification.py @@ -15,7 +15,8 @@ import sqlalchemy as sa from flask import Flask from webmentions_ssg import db -from webmentions_ssg.models import BlockedSource, ReceivedWebmention +from webmentions_ssg.models.moderation import BlockedDomain +from webmentions_ssg.models.received import ReceivedWebmention from webmentions_ssg.net import AddressResolutionError SOURCE_URL = "https://source.example/article" @@ -363,7 +364,7 @@ def test_verify_webmention_refuses_domain_blocked_after_enqueue( ) -> None: identifier = create_webmention(app) with app.app_context(): - db.session.add(BlockedSource(domain="source.example")) + db.session.add(BlockedDomain(domain="source.example")) db.session.commit() fetch = Mock(return_value=True) |
