Chore: Converts all call sites and test asserts to use apply_async and headers (#12591)

This commit is contained in:
Trenton H
2026-04-20 11:40:04 -07:00
committed by GitHub
parent 733d873e34
commit fbf4e32646
24 changed files with 465 additions and 425 deletions
+3 -2
View File
@@ -359,7 +359,8 @@ class MailMocker(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
consume_tasks,
expected_signatures,
):
input_doc, overrides = consume_task.args
input_doc = consume_task.kwargs["input_doc"]
overrides = consume_task.kwargs["overrides"]
# assert the file exists
self.assertIsFile(input_doc.original_file)
@@ -2022,7 +2023,7 @@ class TestMailAccountProcess(APITestCase):
)
self.url = f"/api/mail_accounts/{self.account.pk}/process/"
@mock.patch("paperless_mail.tasks.process_mail_accounts.delay")
@mock.patch("paperless_mail.tasks.process_mail_accounts.apply_async")
def test_mail_account_process_view(self, m) -> None:
response = self.client.post(self.url)
self.assertEqual(response.status_code, status.HTTP_200_OK)