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

@ -1847,7 +1847,7 @@ class AggregateTestCase(TestCase):
)
def test_aggregation_default_using_time_from_database(self):
now = timezone.now().astimezone(timezone.utc)
now = timezone.now().astimezone(datetime.timezone.utc)
expr = Min(
"store__friday_night_closing",
filter=~Q(store__name="Amazon.com"),
@ -1899,7 +1899,7 @@ class AggregateTestCase(TestCase):
)
def test_aggregation_default_using_date_from_database(self):
now = timezone.now().astimezone(timezone.utc)
now = timezone.now().astimezone(datetime.timezone.utc)
expr = Min("book__pubdate", default=TruncDate(NowUTC()))
queryset = Publisher.objects.annotate(earliest_pubdate=expr).order_by("name")
self.assertSequenceEqual(
@ -1960,7 +1960,7 @@ class AggregateTestCase(TestCase):
)
def test_aggregation_default_using_datetime_from_database(self):
now = timezone.now().astimezone(timezone.utc)
now = timezone.now().astimezone(datetime.timezone.utc)
expr = Min(
"store__original_opening",
filter=~Q(store__name="Amazon.com"),