diff options
Diffstat (limited to '')
| -rw-r--r-- | tests/test_views.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_views.py b/tests/test_views.py index 8ac57b1..fb12b8b 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -693,6 +693,13 @@ def test_resend_sent_webmention_reopens_current_revision( send_webmention = Mock() monkeypatch.setattr(views_module, "send_webmention", send_webmention) + with app.app_context(): + webmention = db.session.get(SentWebmention, webmention_identifier) + assert webmention is not None + webmention.attempt_count = 6 + webmention.next_retry_at = datetime.now(UTC) + timedelta(hours=24) + db.session.commit() + response = client.post(f"/sent/{source_identifier}/{webmention_identifier}/resend") assert response.status_code == 302 @@ -703,6 +710,8 @@ def test_resend_sent_webmention_reopens_current_revision( assert webmention is not None assert webmention.desired_revision == 3 assert webmention.processed_revision is None + assert webmention.attempt_count == 0 + assert webmention.next_retry_at is None assert webmention.sent_revision == 2 assert webmention.status is None assert webmention.failure_reason is None |
