Refs #32365 -- Removed internal uses of utils.timezone.utc alias.

Remaining test case ensures that uses of the alias are mapped
canonically by the migration writer.
This commit is contained in:
Carlton Gibson 2022-03-23 12:15:36 +01:00 committed by Mariusz Felisiak
parent 1cf60ce601
commit bb61f0186d
33 changed files with 115 additions and 102 deletions

View file

@ -55,7 +55,6 @@ from django.db.models.indexes import IndexExpression
from django.db.transaction import TransactionManagementError, atomic
from django.test import TransactionTestCase, skipIfDBFeature, skipUnlessDBFeature
from django.test.utils import CaptureQueriesContext, isolate_apps, register_lookup
from django.utils import timezone
from .fields import CustomManyToManyField, InheritedManyToManyField, MediumBlobField
from .models import (
@ -4231,7 +4230,7 @@ class SchemaTests(TransactionTestCase):
"""
now = datetime.datetime(month=1, day=1, year=2000, hour=1, minute=1)
now_tz = datetime.datetime(
month=1, day=1, year=2000, hour=1, minute=1, tzinfo=timezone.utc
month=1, day=1, year=2000, hour=1, minute=1, tzinfo=datetime.timezone.utc
)
mocked_datetime.now = mock.MagicMock(return_value=now)
mocked_tz.now = mock.MagicMock(return_value=now_tz)