summaryrefslogtreecommitdiff
path: root/tests/postgres_tests
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/postgres_tests
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/postgres_tests')
-rw-r--r--tests/postgres_tests/test_ranges.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/postgres_tests/test_ranges.py b/tests/postgres_tests/test_ranges.py
index 038e0233c4..859eb0da79 100644
--- a/tests/postgres_tests/test_ranges.py
+++ b/tests/postgres_tests/test_ranges.py
@@ -566,8 +566,8 @@ class TestSerialization(PostgreSQLSimpleTestCase):
lower_date = datetime.date(2014, 1, 1)
upper_date = datetime.date(2014, 2, 2)
- lower_dt = datetime.datetime(2014, 1, 1, 0, 0, 0, tzinfo=datetime.timezone.utc)
- upper_dt = datetime.datetime(2014, 2, 2, 12, 12, 12, tzinfo=datetime.timezone.utc)
+ lower_dt = datetime.datetime(2014, 1, 1, 0, 0, 0, tzinfo=datetime.UTC)
+ upper_dt = datetime.datetime(2014, 2, 2, 12, 12, 12, tzinfo=datetime.UTC)
def test_dumping(self):
instance = RangesModel(
@@ -992,7 +992,7 @@ class TestFormField(PostgreSQLSimpleTestCase):
field = pg_forms.DateTimeRangeField()
value = field.prepare_value(
DateTimeTZRange(
- datetime.datetime(2015, 5, 22, 16, 6, 33, tzinfo=datetime.timezone.utc),
+ datetime.datetime(2015, 5, 22, 16, 6, 33, tzinfo=datetime.UTC),
None,
)
)