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

@@ -33,7 +33,7 @@
# License for the specific language governing permissions and limitations under the License.
import copy
from datetime import datetime, timedelta
from datetime import datetime, timedelta, timezone
from decimal import Decimal
from unittest import mock
@@ -43,7 +43,6 @@ from django.core.files.base import ContentFile
from django.utils.timezone import now
from django_countries.fields import Country
from django_scopes import scopes_disabled
from pytz import UTC
from tests.const import SAMPLE_PNG
from pretix.base.models import (
@@ -63,15 +62,15 @@ def variations(item):
@pytest.fixture
def order(event, item, taxrule):
testtime = datetime(2017, 12, 1, 10, 0, 0, tzinfo=UTC)
testtime = datetime(2017, 12, 1, 10, 0, 0, tzinfo=timezone.utc)
with mock.patch('django.utils.timezone.now') as mock_now:
mock_now.return_value = testtime
o = Order.objects.create(
code='FOO', event=event, email='dummy@dummy.test',
status=Order.STATUS_PENDING, secret="k24fiuwvu8kxz3y1",
datetime=datetime(2017, 12, 1, 10, 0, 0, tzinfo=UTC),
expires=datetime(2017, 12, 10, 10, 0, 0, tzinfo=UTC),
datetime=datetime(2017, 12, 1, 10, 0, 0, tzinfo=timezone.utc),
expires=datetime(2017, 12, 10, 10, 0, 0, tzinfo=timezone.utc),
total=23, locale='en'
)
o.fees.create(fee_type=OrderFee.FEE_TYPE_PAYMENT, value=Decimal('0.25'), tax_rate=Decimal('19.00'),