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

@@ -21,13 +21,12 @@
#
import copy
import json
from datetime import datetime, timedelta
from datetime import datetime, timedelta, timezone
from unittest import mock
import pytest
from django.utils.timezone import now
from django_scopes import scopes_disabled
from pytz import UTC
from pretix.base.models import (
Event, Item, Order, OrderPosition, Organizer, Quota, Team, User,
@@ -91,7 +90,7 @@ RES_JOB = {
@pytest.mark.django_db
def test_api_list(env, client):
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
@@ -111,7 +110,7 @@ def test_api_list(env, client):
@pytest.mark.django_db
def test_api_detail(env, client):
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