diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2025-02-18 08:35:36 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-18 08:35:36 +0100 |
| commit | efb7f9ced2dcf71294353596a265e3fd67faffeb (patch) | |
| tree | b24b6127022fbe48c517d1acbe9e3c0c502391d9 /tests/humanize_tests | |
| parent | 0d1dd6bba0c18b7feb6caa5cbd8df80fbac54afd (diff) | |
Refs #36005 -- Used datetime.UTC alias instead of datetime.timezone.utc.
datetime.UTC was added in Python 3.11.
Diffstat (limited to 'tests/humanize_tests')
| -rw-r--r-- | tests/humanize_tests/tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/humanize_tests/tests.py b/tests/humanize_tests/tests.py index ab967e2874..19393b590e 100644 --- a/tests/humanize_tests/tests.py +++ b/tests/humanize_tests/tests.py @@ -441,7 +441,7 @@ class HumanizeTests(SimpleTestCase): def test_naturalday_uses_localtime(self): # Regression for #18504 # This is 2012-03-08HT19:30:00-06:00 in America/Chicago - dt = datetime.datetime(2012, 3, 9, 1, 30, tzinfo=datetime.timezone.utc) + dt = datetime.datetime(2012, 3, 9, 1, 30, tzinfo=datetime.UTC) orig_humanize_datetime, humanize.datetime = humanize.datetime, MockDateTime try: @@ -478,7 +478,7 @@ class HumanizeTests(SimpleTestCase): now + datetime.timedelta(days=2, hours=6), now + datetime.timedelta(days=500), now.replace(tzinfo=naive()), - now.replace(tzinfo=datetime.timezone.utc), + now.replace(tzinfo=datetime.UTC), ] result_list = [ "test", |
