summaryrefslogtreecommitdiff
path: root/tests/aggregation
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2025-02-18 08:35:36 +0100
committerGitHub <noreply@github.com>2025-02-18 08:35:36 +0100
commitefb7f9ced2dcf71294353596a265e3fd67faffeb (patch)
treeb24b6127022fbe48c517d1acbe9e3c0c502391d9 /tests/aggregation
parent0d1dd6bba0c18b7feb6caa5cbd8df80fbac54afd (diff)
Refs #36005 -- Used datetime.UTC alias instead of datetime.timezone.utc.
datetime.UTC was added in Python 3.11.
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 861b2c5dfc..86151000b5 100644
--- a/tests/aggregation/tests.py
+++ b/tests/aggregation/tests.py
@@ -1932,7 +1932,7 @@ class AggregateTestCase(TestCase):
)
def test_aggregation_default_using_time_from_database(self):
- now = timezone.now().astimezone(datetime.timezone.utc)
+ now = timezone.now().astimezone(datetime.UTC)
expr = Min(
"store__friday_night_closing",
filter=~Q(store__name="Amazon.com"),
@@ -1984,7 +1984,7 @@ class AggregateTestCase(TestCase):
)
def test_aggregation_default_using_date_from_database(self):
- now = timezone.now().astimezone(datetime.timezone.utc)
+ now = timezone.now().astimezone(datetime.UTC)
expr = Min("book__pubdate", default=TruncDate(NowUTC()))
queryset = Publisher.objects.annotate(earliest_pubdate=expr).order_by("name")
self.assertSequenceEqual(
@@ -2045,7 +2045,7 @@ class AggregateTestCase(TestCase):
)
def test_aggregation_default_using_datetime_from_database(self):
- now = timezone.now().astimezone(datetime.timezone.utc)
+ now = timezone.now().astimezone(datetime.UTC)
expr = Min(
"store__original_opening",
filter=~Q(store__name="Amazon.com"),