Bump Django to 4.1.* (#2989)

This commit is contained in:
Raphael Michel
2023-06-05 09:56:31 +02:00
committed by GitHub
parent 3a8556bb78
commit bd32b33ba9
119 changed files with 742 additions and 613 deletions

View File

@@ -37,6 +37,7 @@ import datetime
import re
from decimal import Decimal
from json import loads
from zoneinfo import ZoneInfo
from bs4 import BeautifulSoup
from django.conf import settings
@@ -45,7 +46,6 @@ from django.core.exceptions import ValidationError
from django.test import TestCase
from django.utils.timezone import now
from django_scopes import scopes_disabled
from pytz import timezone
from tests.base import SoupTest
from tests.testdummy.signals import FoobarSalesChannel
@@ -1393,11 +1393,11 @@ class EventIcalDownloadTest(EventTestMixin, SoupTest):
fmt = '%Y%m%dT%H%M%S'
self.assertIn('DTSTART;TZID=%s:%s' %
(self.event.settings.timezone,
self.event.date_from.astimezone(timezone(self.event.settings.timezone)).strftime(fmt)),
self.event.date_from.astimezone(ZoneInfo(self.event.settings.timezone)).strftime(fmt)),
ical, 'incorrect start time')
self.assertIn('DTEND;TZID=%s:%s' %
(self.event.settings.timezone,
self.event.date_to.astimezone(timezone(self.event.settings.timezone)).strftime(fmt)),
self.event.date_to.astimezone(ZoneInfo(self.event.settings.timezone)).strftime(fmt)),
ical, 'incorrect end time')
self.assertIn('TZID:%s' % self.event.settings.timezone, ical, 'missing VCALENDAR')
@@ -1416,7 +1416,7 @@ class EventIcalDownloadTest(EventTestMixin, SoupTest):
fmt = '%Y%m%dT%H%M%S'
self.assertIn('DTSTART;TZID=%s:%s' %
(self.event.settings.timezone,
self.event.date_from.astimezone(timezone(self.event.settings.timezone)).strftime(fmt)),
self.event.date_from.astimezone(ZoneInfo(self.event.settings.timezone)).strftime(fmt)),
ical, 'incorrect start time')
self.assertNotIn('DTEND', ical, 'unexpected end time attribute')