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/auth_tests/test_remote_user.py | |
| 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/auth_tests/test_remote_user.py')
| -rw-r--r-- | tests/auth_tests/test_remote_user.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auth_tests/test_remote_user.py b/tests/auth_tests/test_remote_user.py index 85de931c1a..67748d6c23 100644 --- a/tests/auth_tests/test_remote_user.py +++ b/tests/auth_tests/test_remote_user.py @@ -1,4 +1,4 @@ -from datetime import datetime, timezone +from datetime import UTC, datetime from django.conf import settings from django.contrib.auth import aauthenticate, authenticate @@ -197,7 +197,7 @@ class RemoteUserTest(TestCase): # Set last_login to something so we can determine if it changes. default_login = datetime(2000, 1, 1) if settings.USE_TZ: - default_login = default_login.replace(tzinfo=timezone.utc) + default_login = default_login.replace(tzinfo=UTC) user.last_login = default_login user.save() @@ -216,7 +216,7 @@ class RemoteUserTest(TestCase): # Set last_login to something so we can determine if it changes. default_login = datetime(2000, 1, 1) if settings.USE_TZ: - default_login = default_login.replace(tzinfo=timezone.utc) + default_login = default_login.replace(tzinfo=UTC) user.last_login = default_login await user.asave() |
