feat: harden webtool

This commit is contained in:
Alex committed 2026-07-20 19:57:44 +01:00
1 parent 3cbd284948
commit 64b3bd3356
20 files changed
+939 -80

No files matched your search

+10
View File
@@ -182,6 +182,16 @@ class TestStoreAttachmentTask:
mock_worker.assert_called_once_with(ANY, {"file": "info"}, "user1")
assert result == {"status": "ok"}
@pytest.mark.unit
def test_data_errors_are_not_autoretried(self):
# A DataError is deterministic (poison payload) — retrying it five
# times just multiplies log noise for the same terminal failure.
from sqlalchemy.exc import DataError
from application.api.user.tasks import store_attachment
assert DataError in getattr(store_attachment, "dont_autoretry_for", ())
class TestProcessAgentWebhookTask:
@pytest.mark.unit