diff options
author | Carlton Gibson <carlton.gibson@noumenal.es> | 2022-03-23 12:15:36 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-03-24 06:29:50 +0100 |
commit | bb61f0186d5c490caa44f3e3672d81e14414d33c (patch) | |
tree | 71e682d415e4640fd1e950af0e4921b2af57ea60 /tests/humanize_tests | |
parent | 1cf60ce6017d904024ee132f7edae0b4b821a954 (diff) | |
download | django-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/humanize_tests')
-rw-r--r-- | tests/humanize_tests/tests.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/humanize_tests/tests.py b/tests/humanize_tests/tests.py index c98bab382d..432314f795 100644 --- a/tests/humanize_tests/tests.py +++ b/tests/humanize_tests/tests.py @@ -6,7 +6,7 @@ from django.template import Context, Template, defaultfilters from django.test import SimpleTestCase, modify_settings, override_settings from django.utils import translation from django.utils.html import escape -from django.utils.timezone import get_fixed_timezone, utc +from django.utils.timezone import get_fixed_timezone from django.utils.translation import gettext as _ # Mock out datetime in some tests so they don't fail occasionally when they @@ -359,7 +359,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=utc) + dt = datetime.datetime(2012, 3, 9, 1, 30, tzinfo=datetime.timezone.utc) orig_humanize_datetime, humanize.datetime = humanize.datetime, MockDateTime try: @@ -396,7 +396,7 @@ class HumanizeTests(SimpleTestCase): now + datetime.timedelta(days=2, hours=6), now + datetime.timedelta(days=500), now.replace(tzinfo=naive()), - now.replace(tzinfo=utc), + now.replace(tzinfo=datetime.timezone.utc), ] result_list = [ "test", |