forked from CGM_Public/pretix_original
add test for ticket reminder (oops)
This commit is contained in:
@@ -1057,7 +1057,7 @@ def send_download_reminders(sender, **kwargs):
|
|||||||
if days is None:
|
if days is None:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if o.sales_channel not in event.settings.mail_sales_channel_placed_paid:
|
if o.sales_channel not in event.settings.mail_sales_channel_ticket_reminder:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
reminder_date = (o.first_date - timedelta(days=days)).replace(hour=0, minute=0, second=0, microsecond=0)
|
reminder_date = (o.first_date - timedelta(days=days)).replace(hour=0, minute=0, second=0, microsecond=0)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import csv
|
import csv
|
||||||
from _decimal import Decimal
|
from decimal import Decimal
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|||||||
@@ -543,6 +543,13 @@ class DownloadReminderTests(TestCase):
|
|||||||
send_download_reminders(sender=self.event)
|
send_download_reminders(sender=self.event)
|
||||||
assert len(djmail.outbox) == 0
|
assert len(djmail.outbox) == 0
|
||||||
|
|
||||||
|
@classscope(attr='o')
|
||||||
|
def test_not_sent_for_disabled_sales_channel(self):
|
||||||
|
self.event.settings.mail_days_download_reminder = 2
|
||||||
|
self.event.settings.mail_sales_channel_ticket_reminder = []
|
||||||
|
send_download_reminders(sender=self.event)
|
||||||
|
assert len(djmail.outbox) == 0
|
||||||
|
|
||||||
|
|
||||||
class OrderCancelTests(TestCase):
|
class OrderCancelTests(TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user