summaryrefslogtreecommitdiff
path: root/tests/aggregation
diff options
context:
space:
mode:
authorCarlton Gibson <carlton.gibson@noumenal.es>2022-03-23 12:15:36 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-03-24 06:29:50 +0100
commitbb61f0186d5c490caa44f3e3672d81e14414d33c (patch)
tree71e682d415e4640fd1e950af0e4921b2af57ea60 /tests/aggregation
parent1cf60ce6017d904024ee132f7edae0b4b821a954 (diff)
downloaddjango-bb61f0186d5c490caa44f3e3672d81e14414d33c.tar.gz
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.
Diffstat (limited to 'tests/aggregation')
-rw-r--r--tests/aggregation/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/aggregation/tests.py b/tests/aggregation/tests.py
index 4ca8729a4b..b779fe551c 100644
--- a/tests/aggregation/tests.py
+++ b/tests/aggregation/tests.py
@@ -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"),