mirror of
https://github.com/django/django.git
synced 2025-09-13 22:16:28 +00:00
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:
parent
1cf60ce601
commit
bb61f0186d
33 changed files with 115 additions and 102 deletions
|
@ -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"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue