Revert "First steps into pytz deprecation"

This reverts commit e4e7d50659.
This commit is contained in:
Raphael Michel
2023-02-01 13:15:18 +01:00
parent e4e7d50659
commit 59d46ddded
63 changed files with 362 additions and 341 deletions

View File

@@ -21,12 +21,13 @@
#
import copy
import json
from datetime import datetime, timedelta, timezone
from datetime import datetime, timedelta
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,
@@ -88,7 +89,7 @@ RES_JOB = {
@pytest.mark.django_db
def test_api_list(env, client):
testtime = datetime(2017, 12, 1, 10, 0, 0, tzinfo=timezone.utc)
testtime = datetime(2017, 12, 1, 10, 0, 0, tzinfo=UTC)
with mock.patch('django.utils.timezone.now') as mock_now:
mock_now.return_value = testtime
@@ -108,7 +109,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=timezone.UTC)
testtime = datetime(2017, 12, 1, 10, 0, 0, tzinfo=UTC)
with mock.patch('django.utils.timezone.now') as mock_now:
mock_now.return_value = testtime