add test for ticket reminder (oops)

This commit is contained in:
Felix Rindt
2020-07-24 16:21:12 +02:00
parent 7aa793f4f7
commit d0ccc42aff
3 changed files with 9 additions and 2 deletions

View File

@@ -1057,7 +1057,7 @@ def send_download_reminders(sender, **kwargs):
if days is None:
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
reminder_date = (o.first_date - timedelta(days=days)).replace(hour=0, minute=0, second=0, microsecond=0)

View File

@@ -1,5 +1,5 @@
import csv
from _decimal import Decimal
from decimal import Decimal
from io import StringIO
import pytest

View File

@@ -543,6 +543,13 @@ class DownloadReminderTests(TestCase):
send_download_reminders(sender=self.event)
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):
def setUp(self):