summaryrefslogtreecommitdiff
path: root/tests/staticfiles_tests
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/staticfiles_tests
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/staticfiles_tests')
-rw-r--r--tests/staticfiles_tests/storage.py3
-rw-r--r--tests/staticfiles_tests/test_management.py3
2 files changed, 2 insertions, 4 deletions
diff --git a/tests/staticfiles_tests/storage.py b/tests/staticfiles_tests/storage.py
index 1bb4e37485..51614fbb18 100644
--- a/tests/staticfiles_tests/storage.py
+++ b/tests/staticfiles_tests/storage.py
@@ -1,10 +1,9 @@
import os
-from datetime import datetime, timedelta
+from datetime import datetime, timedelta, timezone
from django.conf import settings
from django.contrib.staticfiles.storage import ManifestStaticFilesStorage
from django.core.files import storage
-from django.utils import timezone
class DummyStorage(storage.Storage):
diff --git a/tests/staticfiles_tests/test_management.py b/tests/staticfiles_tests/test_management.py
index 09ce7c488c..6dec3a67bd 100644
--- a/tests/staticfiles_tests/test_management.py
+++ b/tests/staticfiles_tests/test_management.py
@@ -17,7 +17,6 @@ from django.core.management import CommandError, call_command
from django.core.management.base import SystemCheckError
from django.test import RequestFactory, override_settings
from django.test.utils import extend_sys_path
-from django.utils import timezone
from django.utils._os import symlinks_supported
from django.utils.functional import empty
@@ -531,7 +530,7 @@ class TestCollectionNonLocalStorage(TestNoFilesCreated, CollectionTestCase):
storage = DummyStorage()
self.assertEqual(
storage.get_modified_time("name"),
- datetime.datetime(1970, 1, 1, tzinfo=timezone.utc),
+ datetime.datetime(1970, 1, 1, tzinfo=datetime.timezone.utc),
)
with self.assertRaisesMessage(
NotImplementedError, "This backend doesn't support absolute paths."