-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✅ [#3005] Update/Add/Delete tests after task orchestration refactor
- Loading branch information
1 parent
8f9e6db
commit 10cf117
Showing
21 changed files
with
1,428 additions
and
428 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,13 +5,14 @@ | |
from unittest.mock import patch | ||
|
||
from django.core import mail | ||
from django.test import TestCase | ||
from django.test import TestCase, override_settings | ||
from django.utils import timezone | ||
from django.utils.html import escape | ||
from django.utils.translation import gettext as _ | ||
|
||
from openforms.config.models import GlobalConfiguration | ||
from openforms.formio.typing import Component | ||
from openforms.submissions.tasks import schedule_emails | ||
from openforms.submissions.tests.factories import SubmissionFactory | ||
from openforms.submissions.utils import send_confirmation_email | ||
from openforms.utils.tests.html_assert import HTMLAssertMixin | ||
|
@@ -93,6 +94,7 @@ def get_required_customer_fields(self, *args, **kwargs) -> list[Component]: | |
return [LAST_NAME, EMAIL] | ||
|
||
|
||
@override_settings(CELERY_TASK_ALWAYS_EAGER=True) | ||
class AppointmentCreationConfirmationMailTests(HTMLAssertMixin, TestCase): | ||
@classmethod | ||
def setUpTestData(cls): | ||
|
@@ -127,7 +129,7 @@ def test_send_confirmation_mail_disabled(self): | |
contact_details={"lastName": "Powers", "email": "[email protected]"}, | ||
) | ||
|
||
send_confirmation_email(appointment.submission) | ||
schedule_emails(appointment.submission.id) | ||
|
||
self.assertEqual(len(mail.outbox), 0) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.