From da1bf48903f91ba6a313ad303b5c39bdc0c0f2ef Mon Sep 17 00:00:00 2001 From: Richard Schreiber Date: Wed, 5 Aug 2026 11:15:50 +0200 Subject: [PATCH] Add placeholders to tests --- src/tests/plugins/sendmail/conftest.py | 2 ++ src/tests/plugins/sendmail/test_sendmail.py | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/tests/plugins/sendmail/conftest.py b/src/tests/plugins/sendmail/conftest.py index 3081c975b1..37e47cd3ff 100644 --- a/src/tests/plugins/sendmail/conftest.py +++ b/src/tests/plugins/sendmail/conftest.py @@ -35,6 +35,8 @@ def event(): organizer=o, name='Dummy', slug='dummy', date_from=now(), live=True, plugins='pretix.plugins.sendmail,tests.testdummy', + location='Foo City', + date_admission=now().replace(hour=12, minute=30), ) return event diff --git a/src/tests/plugins/sendmail/test_sendmail.py b/src/tests/plugins/sendmail/test_sendmail.py index c971291d03..932df92d8d 100644 --- a/src/tests/plugins/sendmail/test_sendmail.py +++ b/src/tests/plugins/sendmail/test_sendmail.py @@ -464,7 +464,7 @@ def test_sendmail_attendee_subevent_range_filter(logged_in_client, sendmail_url, 'recipients': 'attendees', 'items': item.pk, 'subject_0': 'Test subject', - 'message_0': 'This is a test file for sending mails.', + 'message_0': 'This is a test file for sending mails. {event}, {event_location}, Admission {event_admission_time}', 'subevents_from_0': '2023-07-01', 'subevents_from_1': '00:00:00', 'subevents_to_0': '2023-08-01', @@ -477,6 +477,7 @@ def test_sendmail_attendee_subevent_range_filter(logged_in_client, sendmail_url, assert djmail.outbox[0].to == ['attendee1@dummy.test'] assert '/ticket/' in djmail.outbox[0].body assert '/order/' not in djmail.outbox[0].body + assert 'This is a test file for sending mails. ' in djmail.outbox[0].body @pytest.mark.django_db @@ -599,7 +600,7 @@ def test_waitinglist_sendmail_simple_case(logged_in_client, sendmail_url, event, {'action': 'send', 'items': waitinglistentry.item_id, 'subject_0': 'Test subject', - 'message_0': 'This is a test file for sending mails.', + 'message_0': 'This is a test file for sending mails. {event}, {event_location}, Admission {event_admission_time}', }, follow=True) assert response.status_code == 200 @@ -608,7 +609,7 @@ def test_waitinglist_sendmail_simple_case(logged_in_client, sendmail_url, event, assert len(djmail.outbox) == 1 assert djmail.outbox[0].to == [waitinglistentry.email] assert djmail.outbox[0].subject == 'Test subject' - assert 'This is a test file for sending mails.' in djmail.outbox[0].body + assert 'This is a test file for sending mails. Dummy, Foo City, Admission 12:30' in djmail.outbox[0].body url = sendmail_url + 'history/' response = logged_in_client.get(url)